W3 3.2y
4.0y
NS 3.0n
4.0n
IE 3.0n
4.0n
TV 1.2n
2.1y

<!DOCTYPE>

Description

<Related pages>
* The validator service at the W3C can check your pages against a DTD.
* Doctor HTML, a HTML checker.
This code declares which HTML specification the document uses. It should be the first line in your document, before any other element.

Programs, like HTML editors or programs that validate the syntax of HTML documents, can use this code to identify the version of the HTML specification to decide how to perform the validation.

For a HTML page to be a valid HTML 3.2 file it must start with this doctype :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

HTML 4.0 introduced 3 DTD's:

HTML 4.0 Strict DTD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">

The Strict DTD excludes the presentation attributes and elements that W3C expects to phase out as support for style sheets matures. You should use this DTD when possible. When you need to include attributes for presentation in a page you can use the Transitional DTD.

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

The Transitional DTD includes presentation attributes and elements that W3C expects to phase out as support for style sheets matures. You should use the Strict DTD when possible.

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

This DTD should be used for documents with frames. This DTD is identical to the Transitional DTD except for the content model of the "HTML" element: in frameset documents, the "FRAMESET" element replaces the "BODY" element.

Attributes

** None **
Statistics