[Skip navigation] home | about MCU | Services | learn accessible web design | tips archive

RSS syndication for MCU   

The Advantages of Using Valid HTML

HTML standards were developed to make it easy to share and process electronic documents regardless of the type of device, computer platform or operating system used.

Using valid HTML is the first step to creating accessible pages. Valid HTML pages are pages that adhere to a set of rules defined by the World Wide Web Consortium (W3C): these rules describe:

Because HTML has been updated on many occasions, there is more than one set of rules, i.e. one set for each version. The rules for each version are encapsulated in documents called Document Type Definitions (DTD).

Every web page should contain information about the appropriate DTD being used. The DTD should be the first element at the top of every page. This is important for the following reasons:

HTML 4.01 Document Type Definitions

HTML 4.01 can be validated against three Document Type Definitions. Assuming you are coding you pages to the latest version of HTML at the top of the page you should have one of the following DTDs.

1. Strict HTML 4.01 does not allow the use of deprecated elements attributes or the use of framesets. The document definition used to indicate that a page has been marked up in this way is

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

2. Transitional HTML 4.01> allows the use of deprecated elements and attributes but framesets are not allowed:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

3. Frameset HTML 4.01 allows the use of framesets and deprecated elements and attributes:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

Currently the most common DTD used is 'Transitional HTML 4.01' - which means that you have to code your pages as valid HTML version 4.01 but you are allowed to use deprecated elements such as the font tag.

XHTML 1.0 Document Type Definitions

"The XHTML family is the next step in the evolution of the Internet. By migrating to XHTML today, content developers can enter the XML world with all of its attendant benefits, while still remaining confident in their content's backward and future compatibility. " W3C XHTML 1.0 Documentation

Use XHTML 1.0 Strict when you need clean structural markup, and complete separation of presentation and document structure. The downside is that if you make mistakes in your markup the page will not display at all in many browsers.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

For general web use, XHTML 1.0 Transitional is a good choice, as markup can be adjusted to accommodate older browsers while still remain standard compliant. Use of XHTML 1.0 Transitional encourages separation of presentation and structure, and the use of style sheets to alter presenation.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

XHTML 1.0 Frameset is the appropriate DTD if you need to use frames in your web pages.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

Why build websites using valid markup?


The Web Standards Project (WASP) http://webstandards.org/

The Importance of Valid HTML: http://www.hotmetalpro.com/resources/html/validhtml.htm

Web standards for hard times; http://hotwired.lycos.com/webmonkey/02/33/index1a.html


This article is from the training course Accessible website design in practice created by ScotConnect and the Making Connections Unit. © 2002, 2003, 2004 ScotConnect, Making Connections Unit.

Contributed by Jim Byrne
Updated Monday 25 Aug 2003

Free weekly accessible web design tip

Register for your weekly accessible web design tip 


Thanks for this one Jim - we need all the arguments we can muster. Did you see the SlashDot articles - http://www.alistapart.com/articles/slashdot/ and http://www.alistapart.com/articles/slashdot2/

Andrew Arch | Wed Apr 28 2004