Three Versions of (X)HTML
Both the HTML 4.01 and XHTML 1.0 Recommendations encompass three slightly different specification documents, called Document Type Definitions (or DTD s). DTDs define every element, attribute, and entity along with the rules for their use. The three versions are:
- Strict DTD
This version excludes all elements and attributes that have been deprecated (such as
fontandalign) to reinforce the separation of document structure from presentation.- Transitional DTD
The Transitional DTD includes all deprecated elements and attributes in order to be backward-compatible with the legacy behavior of most browsers. Deprecated elements and attributes are permitted but discouraged from use.
- Frameset DTD
The Frameset DTD includes the same elements as the Transitional DTD with the addition of elements for creating framed web pages (
frameset,frame, andnoframe). The Frameset DTD is kept separate because the structure of a framed document (whereframesetreplacesbody) is fundamentally different from regular HTML documents.Note
The XHTML 1.1 Recommendation features only one DTD that is similar to Strict in that it does not include deprecated elements and attributes.
The next section shows how DTDs are identified within (X)HTML documents.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access