Frequently Asked Questions
What is Markup Validation?
Most pages on the World Wide Web are written in computer languages (such as HTML) 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 Markup 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 validation. A document that passes this process with success is called valid.
With these concepts in mind, we can define "markup validation" as the process of checking a Web document against the grammar it claims to be using.
Is validation some kind of quality control?
Validity is one of the many quality criteria for a Web page. It is just one of the steps , an invalid webpage has little chance of being a good webpage. Valid simply means that the W3C Markup Validator has determined that the page complies with a specific set of rules. It does not asses the overall quality of that page.
Does "valid" mean "quality approved by W3C"?
For that reason, the fact that the W3C Markup Validator says that one page passes validation does not mean that W3C assesses that it is a good page. It only means that a tool (not necessarily without flaws) has found the page to comply with a specific set of rules. No more, no less.
Is validity the same thing as conformance?
No. Markup Validation is an important step, but it is just a part of conformance.
Markup languages are defined in technical specifications, which generally include a formal grammar. A document is valid when it is written in accordance to the formal grammar, whereas conformance relates to the specification itself. In most cases, some conformance requirements can not be expressed in the grammar.
The Validator is similar to what Lint was for C. It compares your HTML document to the defined syntax of HTML and reports any discrepancies.
Why should I validate my HTML pages?
One of the important maxims of computer programming is Postel’s Law: "Be conservative in what you produce; be liberal in what you accept."
Browsers follow the second half of this statement by accepting Web pages and trying to display them even if they're not legal HTML - the browser will try to make educated guesses about what was meant.
The problem is that different browsers (or even different versions of the same browser) will make different guesses. And if your HTML is really pathological, the browser could get hopelessly confused. At best, the results are a mangled mess. At worst, a crashed site.
It is your job to fulfill the first half of the maxim by ensuring that your pages are valid.