Validation means checking the mark-up for a web page for faults. It is very imprtant for the mark-up to be flawless and the XHTML or other mark-up language to follow the ‘grammar’ for that language. The following mistakes are very common and will be discovered by a validator:
- Overlapping elements, such as <h1><em>Incorrect nesting</h1></em>
- Missing attributes, such as the missing alt attribute: <img src="koira.jpg" />
By validating the code of your page, you can make sure that your pages follow the standards and will be displayed correctly in different browsers.
Validating the XHTML language
There are many ways to validate your code, but one of the simplest way is to use a free validator service to check your page code. There are many different validator services, but the safest is the validator of the W3 consortium, which maintains the XHTML and other web standards. Their validator is available at http://validator.w3.org.
When you use the W3 validator, you have to load your page to the server of the validator service and let it check the page code. When the validation is complete, you will get immediate feedback about your web page. If the validation does not report any mistakes, you receive the ‘right’ to display the following icon as evidence of the quality of your page:
Validating CSS files
You can also validate the code of your CSS files using e.g. the W3 consortium’s CSS Validator service. The validation is carried out in the same way as described above. If the code of your CSS file is valid, you may display the following icon on your web page as evidence of the quality of your CSS: