HTML Validators - HTML 4

Validation compares a document to a set of document rules — a Document Type Definition (DTD). Simply put, validation checks the actual markup and content against the DTD and flags any deviations it finds.

Typically, a document author follows this process:

  • Create an HTML document in an HTML editor.
  • Let’s say this step results in a file called mypage.htm.
  • Submit mypage.htm to an HTML or XHTML validation site for inspection and validation.
  • If any problems or syntax errors are detected, the validator reports such errors in an annotated version of the original HTML document.
  • If the validator reports errors, the author corrects those errors and resubmits the document for validation.
  • Sometimes, breaking HTML rules is the only way for your page to look right in older Web browsers. But document rules exist for a reason: Nonstandard or incorrect HTML markup often produces odd or unpredictable results.

Browsers usually forgive markup errors. Most browsers identify HTML pages without an <html> element. But someday, markup languages will be so complex and precise that browsers won’t be able to guess whether you’re publishing in HTML or another extensible markup language. Get the markup right from the beginning and save yourself a bunch of trouble later.

HTML validation is built into many HTML editors.

W3C validator

The W3C has a free . The W3C validation tool lets you choose

  • Which HTML or XHTML DTD version to check against your document
  • Output formats:
  • A terse output lists only the line numbers in your document, the boo-boos, and a brief description of each.
  • A verbose output lists great detail about each error and links to the relevant information in the HTML specification.

Built-in validators

Many tools in this chapter offer HTML validation. These include HTML-Kit, HomeSite+, and BBEdit. Use ’em if you got ’em; get ’em if you don’t!


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

HTML 4 Topics