Knowledge7

The Linux and Mobile Solution Provider

  • About
  • Training
  • Services
  • Clients
  • In the news
  • Blog
  • Contact Us
You are here: Home / Topic / Developing semantic W3C compliant web pages

Developing semantic W3C compliant web pages

This topic is part of our Web Development with PHP and MySQL training

People use HTML and CSS to create web pages. Over the years, a number of good design principles have been identified and, when followed, allow anyone to produce websites which are standards-compliant, compatible with all the major websites yet flexible and easily maintainable.

The principles are:

  • Build websites using semantic HTML. Previously, HTML pages mixed structure and presentation. Now, people use CSS for presentation which implies that HTML should only contain the structure of a document. Semantic HTML goes further, in the sense that it uses markup to reinforce the semantics (i.e. the meaning) of a document. For example, only one H1 should be used in a document as one document cannot possibly have more than one main title.
  • Use CSS for formatting. Typographic attributes (e.g. typefaces, weight, etc.) as well as colours, margins, backgrounds, etc. should always be specified in a CSS stylesheet which is linked from the HTML file.
  • Use CSS for positioning. For many years, people used HTML tables for positioning objects on an HTML page but this was brittle and tended to produce bloated webpages.

The work to do is to progressively create a website like the one pictured above using semantic HTML first, then writing CSS “manually” both for formatting and positioning.

Note that web standards are in constant evolution. For example, there is a lot of buzz around HTML5 and CSS3 right now even though the standardisation process is still in progress.

This topic is part of our Web Development with PHP and MySQL training

Our forthcoming training courses

  • No training courses are scheduled.

Leave a Reply

Your email address will not be published. Required fields are marked *

Looking for something?

Want to know more?

Get our newsletter

Discover the latest news, tips and tricks on Linux, the Web and Mobile technologies every week for FREE

This work is licensed by Knowledge7 under an Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.