XHTML Doctypes

XHTML Doctypes

Written

Document Type Definitions (DTD) of XHTML coding is the same as the DTD of HTML coding. If you venture into learning XML, you will also be learning about creating an actual DTD file. For the purposes of a regular XHTML document, a standard DTD from the W3C can be used.

The DTD tag goes at the start of your coding before the starting html tag. There is no closing tag or termination for the DTD tag.

There are 3 Doctypes usable by an XHTML document. Strict, Transitional, and Frameset. The doctype is used when validating an XHTML document's content against a DTD and reporting markup errors. (The DOCTYPE lines below are broken in parts only to prevent the examples from being too wide for non-horizontal scrolling - you can keep it all on one line).

XHTML 1.0 Strict

Use this when you want really clean markup, free of presentational clutter. Use this together with Cascading Style Sheets.

XHTML 1.0 Transitional

Use this when you need to take advantage of HTML's presentational features because many of your readers don't have the latest browsers that understand Cascading Style Sheets.

XHTML 1.0 Frameset

Use this when you want to use HTML Frames to partition the browser window into two or more frames.

Table of Contents

Previous
Conversion From HTML to XHTML