The W3C and Web standards

Originally the Web developed from the ideas of a few people, then a few organisations and everyone had their own opinion about how it should work. After much hassle the WWW Consortium (W3C) seems to have won the battle to be the ones to set the rules and standards. That means that if the W3C says your pages are right then they are. Even if they do not work in a major browser - it must be the browser which is the problem. As time goes on browsers are following the standards much more closely and so Internet Explorer 6 is probably the last real problem browser.

If your site is following standards it should be fairly usable in any browser (which saves you having to check every single one). These tutorials are intended to teach you the standards way but to find out if your pages really are to standard W3C provides a really useful free checking service. There are three ways to use it for HTML pages:

The first option is best as it mimics the way an actual user will access the page so if it works for W3C it should work for anyone. All three also check any embedded or in-line CSS as well as the HTML, XHTML or XML so calling the service just an HTML validator is not totally fair.

There is also a matching CSS validation service for your external CSS stylesheets.

There are 93 errors on your Web page

Whichever way you enter the page for checking you end up with a report which tells you all the problems with your page. There may be many errors but the key is to tackle them one at a time. Often fixing one error will get rid of most of the others as well. The descriptions are not always helpful for beginners. Read them but if they do not make sense just look at the line number for where the problem is and look at the HTML element on that line for problems (and the one before it which may cause the problem because you forgot something). A good HTML and CSS editor will also help by highlighting the errors for you. It also tells you which line you are on (normally at the bottom of the editor window).

Once you have learned XHTML and CSS make sure you still use these validation services regularly. Apart from anything else they spot any stupid mistakes you might have made in your code! Optionally, you can then include a W3C logo on your page.

submit to reddit Delicious Tweet