Doctype Type Declaration

HTML documents are required to start with a Document Type Declaration ("doctype").

In browsers, the doctype helps to define the rendering mode particularly whether to use quirks mode.

The original purpose of the doctype was to enable parsing and validation of HTML documents by SGML tools based on the Document Type Definition (DTD).

An example of an HTML 4 doctype is: