What are DOCTYPEs?
DOCTYPEs identify your content
Every document served across the web has a mime type: this gives a basic idea of the content, whether image or text document. But in order for browsers to accurately render an HTML document, they need more information: what version of HTML is the document using?
This information is provided by the DOCTYPE declaration at the top of the HTML document. Currently, there are six reasonable choices:
-
HTML 4.01 Strict, which defines how content should be defined, along with referenced CSS stylesheets
-
HTML 4.01 Transitional, which allows presentation information to be included along with the content
-
HTML 4.01 Frameset, which provides the template for documents using frames
-
XHTML 1.0 Strict, which is the XML-compliant version of HTML 4.01 Strict
-
XHTML 1.0 Transitional, which is the XML-compliant version of HTML 4.01 Transitional
-
XHTML 1.0 Frameset, which is the XML-compliant version of HTML 4.01 Frameset
Each document should include a DOCTYPE definition before any of the comment. Aggiorno targets XHTML 1.0 Transitional, as this is the most strict and up-to-date definition which can be targetted while documents are in transition. If no DOCTYPE is defined, most browser enter the so-called quirks mode, in which they try to guess what the site developer intended when writing the code.
See Also