Friday, June 20, 2008

Real HTML Validation

Genuine HTML validators employ SGML parsers to check a document's syntax against a document type definition (DTD). HTML standards issued by the W3C specify DTDs for checking the validity of HTML documents.

There are other programs, commonly called "lints" or "linters," that also check HTML documents. However, lints generally do not use an SGML parser with a DTD, but instead use a simpler, less formal parser. Lints do not find all errors caught by a real validator, and they often report false errors.

Lints are useful tools for tracking down problems other than invalid HTML. For example, a lint might point out that the OBJECT element is poorly supported among current browsers or that the FONT element is considered harmful. Reports from lints are subjective--they reflect the opinions of the lint's developer. Reports from validators are objective--they simply tell you what your errors are according to HTML standards.

Using a lint is not a substitute for real HTML validation. New developments on the Web--such as the growing use of XML and the strong standards focus of Mozilla--continue to demonstrate the need for valid HTML. Using just a lint is not enough.

Unfortunately, some programs claim to be "HTML validators" when they are really lints. In an attempt to avoid confusion, here are separate lists of true validators and lints. As you can see, many of the lints generate bogus errors for this document, which is valid HTML 4.0 Strict and compatible with any browser.

Real Validators

Lints