One attribute of HTML documents that is frequentlyoverlooked is the Document Type Definition (DTD). Thisdefinition precedes any document tags and exists to inform client browsers of the format of the following content—what tags to expect, methods to support, and so forth.
The <!DOCTYPE> tag is used to specify an existing DTD. TheDTD contains all the elements, definitions, events, and so on associated with the document type.
A DOCTYPE tag resembles the following:
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “http://www.w3.org/TR/html4/strict.dtd”>
This tag specifies the following information:
- The document’s top tag level is HTML (html).
- The document adheres to the formal public identifier (FPI)“W3C HTML 4.01 Strict English” standards (PUBLIC “-//W3C//DTD HTML 4.01//EN”).
- The full DTD can be found at the URL http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd