Validating XHTML
Validating your Web pages ensures compliance with W3C standards and makes for more consistent rendering and better accessibility in a variety of compliant browsers across platforms.
While error messages aren’t always poetry, the W3C’s validator provides you with consultation from an (X)HTML and CSS expert for the price of a dirty look.
Common mistakes
The validator often reports problems more than once; an open paragraph tag (<p>) is likely to be reported multiple times because subsequent tags would be improperly nested. To minimize tail-chasing, correct errors and revalidate one problem at a time.
- Match opening and closing tags (
<h2></h2>) - Close tags in the proper order (
<p>Sample <em>emphasized</em> text</p>) - Close empty tags with (
/) (<img src ... />) - Quote attributes (
<img ... width="500" ... />)
Flavors of the validator
The free W3C validator is located at: http://validator.w3.org/
If you wish to validate your pages offline use the file upload validator: http://validator.w3.org/file-upload.html