12. XHTML Document Types

Three document variants are available for XHTML. Each variant of XHTML has its own DTD which sets out the rules and regulations for using XHTML in a specific and explicit way.

Three XHTML DTDs:

The preferred document variant can be specified by inserting a DOCTYPE line at the beginning of the document. The DOCTYPE Declaration is not part of the XHTML document itself and is not considered an XHTML element therefore it does not require a closing tag.

Example 12.1 DTD Declaration
    <!DOCTYPE Doctype goes here...>
    <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
            <title>...</title>
        </head>
        <body>...</body>
    </html>