Most pages on the World Wide Web are written in computer languages (such as ) that allow Web authors to structure text, add multimedia content, and specify what appearance, or style, the result should have.

As for every language, these have their own grammar, vocabulary and syntax, and every document written with these computer languages are supposed to follow these rules.

However, just as texts in a natural language can include spelling or grammar errors, documents using languages may (for various reasons) not be following these rules. The process of verifying whether a document actually follows the rules for the language(s) it uses is called , and the tool used for that is a validator. A document that passes this process with success is called valid.

With these concepts in mind, we can define “ ” as the process of checking a Web document against the grammar it claims to be using.

Why should I validate my pages?

One of the important maxims of computer programming is: Be conservative in what you produce; be liberal in what you accept.

Browsers follow the second half of this maxim by accepting Web pages and trying to display them even if they’re not legal . Usually this means that the browser will try to make educated guesses about what you probably meant. The problem is that different browsers (or even different versions of the same browser) will make different guesses about the same illegal construct; worse, if your is really pathological, the browser could get hopelessly confused and produce a mangled mess, or even crash.

That’s why you want to follow the first half of the maxim by making sure your pages are legal . The best way to do that is by running your documents through one or more validators

W3C Validation Service

Service
http://validator.w3.org

CSS Service
http://jigsaw.w3.org/css-validator/validator.html.en

Tags: , , ,