Most HTML authors will use one of a fairly small number of Document Type Definitions (DTDs), published by the relevant de jure and de facto standards bodies. These have been designed to reflect current recommended practice and browser support, at the time of publication.
As regular users of HTML and developers of HTML tools, we believe we have identified some minor shortcomings in the main published DTDs. We are pleased to offer an alternative DTD, based on the current W3C recommendation but enhanced for improved accessibility as described below.
In the context of the WWW, a Document Type Definition (DTD) is an SGML document that defines a formal, machine-readable standard for HTML. It determines exactly what is or isn't allowed in HTML, and tells SGML-aware software, such as validators and the more advanced browsers and authoring tools, how to parse an HTML document.
Standard DTDs for HTML and XHTML are published by the IETF, the W3C, and the ISO/IEC. The main HTML specs include:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
The first widely-used public DTD describing HTML as an SGML application.
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN//">
HTML 3.0 introduced Tables, figures and mathematical markup, Clientside event handling, and stylesheet support. Note that much of HTML 3.0 has not been preserved in later DTDs. With a supporting browser such as Arena, HTML 3.0 is good for presenting mathematical and scientific documents.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
HTML 3.2 represents HTML as supported by popular browsers in 1996. It introduces a range of presentational elements introduced by Netscape and copied by most other browsers.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
HTML 4.0 and 4.01 (which is a bug-fix update on 4.0) has three separate DTDs:
<!DOCTYPE HTML PUBLIC "ISO/IEC 15445:2000//DTD HTML//EN">
The most recent HTML DTD and formal standard is somewhat similar to W3C's HTML 4 Strict but is significantly stricter in structural enforcement.
It is of course possible for anyone to create a custom DTD. This would typically use a SYSTEM identifier of the form <!DOCTYPE HTML SYSTEM "url.of.DTD">. For more information on creating a custom DTD, please see the WDG's Custom DTD Page.
The aim of the WDG DTD is to promote maximum accessibility and
browser compatibility, without breaking existing technologies.
Our first (and currently only) DTD is
which is designed for maximum back-compatibility, and offers full
support for complementary WWW technologies such as CSS
Stylesheets for presentation and
wdg-compat.dtd is based on the W3C's HTML 4.01 Strict,
with a number of changes:
TBODYelement) has been changed from optional to required. This avoids the risk of triggering stylesheet bugs in a number of browsers. In addition, it improves Netscape 4.x support immensely by avoiding problems with its table support. You can use Code Valet to add all necessary closures in your documents.
BLOCKQUOTE, and the
To use a WDG DTD in your HTML document, you should properly use a SYSTEM identifier, although you can also use our unofficial PUBLIC identifier (as used in this document). The overall structure of your document will be:
<!DOCTYPE HTML SYSTEM "http://www.htmlhelp.org/design/dtd/wdg-compat.dtd"> <html> <head> .... </head> <body> .... </body> </html>
For a Frameset document, you would use:
<!DOCTYPE HTML SYSTEM "http://www.htmlhelp.org/design/dtd/wdg-compat.dtd"> <html> <head> .... </head> <frameset ...> <frame ...>(one or more)
<noframes> <body> .... </body> </noframes> </frameset> </html>
This page is itself a simple example using