Thomas Wallace: Lectures and Resources - A collection of website design lectures and resources

Validating Your Web Site

What is Validation?

From the World Wide Web Consortium (W3C)

Validation is a process of checking your documents against a formal Standard, such as those published by the World Wide Web Consortium (W3C) for HTML and XML-derived Web document types, or by the WapForum for WML, etc. It serves a similar purpose to spell checking and proofreading for grammar and syntax, but is much more precise and reliable than any of those processes because it is dealing with precisely-specified machine languages, not with nebulously-defined human natural language.

It is important to note that validation has a very precise meaning. Unfortunately the issue is confused by the fact that some products falsely claim to "validate", whilst in fact applying an arbitrary selection of tests that are not derived from any standard. Such tools may be genuinely useful, but should be used alongside true validation, not in place of it.

Why Validate?

Well, firstly there is the very practical issue that non-valid pages are (by definition) relying on error-correction by a browser. This error correction can and does vary radically across different browsers and versions, so that many authors who unwittingly relied on the quirks of Netscape 1.1 suddenly found their pages appeared totally blank in Netscape 2.0. Whilst Internet Explorer initially set out to be bug-compatible with Netscape, it too has moved towards standards compliance in later releases. Other browsers differ further.

How to Validate Your HTML Document

  1. Open the page you wish to validate in Dreamweaver.
  2. From the Commands menu select Clean up XHTML
  3. From the Commands menu select apply source formatting
    Validation

Note: Steps 2 and 3 are not directly involved with the validation of your page. These two steps will help us find any obvious errors (if there are any) and format our code so it will be easier to troubleshoot any validation errors.

  1. Save and publish the file to your web server.
  2. Visit http://validator.w3.org/
  3. Enter your site URL into the Validate by URL Input and Press Check
  4. Validate this Page
  5. Correct any errors that the validator reports

Validating your CSS

  1. Validate your HTML Document. You will not be able to validate your CSS until your HTML validates.
  2. Visit http://jigsaw.w3.org/css-validator/
  3. Correct any errors that the validator reports