<Related pages> | ||||
| ||||
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:
<!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.
<!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.
<!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.