Posted in HTML
Tags: ,

The DOCTYPE isn’t exactly an HTML tag or XHTML element. Instead it is a declaration and always appears at the very top of your documents. It identifies the version of the markup  language the page was created.

It refers to a known Document Type Definition, or DTD for short. The DTD sets out the rules and grammar for that version of markup, enabling the browser to render the content as well as allow a validator which version of HTML to use in checking the document’s syntax.

Below are the most common DOCTYPES, although HTML5 should be the one you use from now on.

HTML 4.01 Transitional

The Transitional DTD includes deprecated elements and attributes:

HTML 4.01 Strict

The Strict DTD omits all deprecated elements and attributes:

XHTML 1.0 Strict

The same as HTML 4.01 Strict, but reformulated according to the syntax rules of XML:

XHTML 1.0 Transitional

The same as HTML 4.01 Transitional, but reformulated according to the syntax rules of  XML:


Does not not have a DTD, which is why it has a simple DOCTYPE declaration


Leave a Reply

Your email address will not be published. Required fields are marked *