<! Doctype> declares that it is not an HTML tag and is not sensitive to capitalization, but rather instructs the Web browser about which HTML version the page uses to write the instructions. and the declaration must be the first line in the HTML document, before the
No <!. Consequences of the Doctype> declaration: If there is no document type declaration, most browsers (including IE and Firefox) will be converted to a promiscuous mode in which the same style of the browser will appear inconsistent. When you add a declaration, the browser knows you want to use a stricter standard mode.
The simplest HTML5 documentation:
<! Dovtype HTML > < title > HTML page </title><Div> simplest HTML5 document </ div>
In HTML 4.01, <! The doctype> declaration references a DTD because HTML 4.01 is based on SGML. The DTD prescribes the rules of the markup language so that the browser renders the content correctly.
HTML 4.01 Strict: The DTD contains all HTML elements and attributes, but does not include both display and deprecated elements (such as font). Frameset (framesets) is not allowed.
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01//en" "HTTP://WWW.W3.ORG/TR/HTML4/STRICT.DTD" >
HTML 4.01 Transitionan: The DTD contains all the HTML elements and attributes, including both display and deprecated elements (such as font). Frameset (framesets) is not allowed.
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd " >
HTML 4.01 Frameset: This DTD is equivalent to HTML 4.01 Transitional, but allows frameset content.
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 frameset//en" "Http://www.w3.org/TR/html4/frameset.dtd " >
XHTML 1.0 Strict: This DTD contains all HTML elements and attributes, but does not include both display and deprecated elements (such as font). Frameset (framesets) is not allowed. tags must be written in well-formed XML.
<! DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd " >
XHTML 1.0 Transitional: This DTD contains all HTML elements and attributes, including both display and deprecated elements (such as font). Frameset (framesets) is not allowed. tags must be written in well-formed XML.
<! DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd ">
XHTML 1.0 Frameset: This DTD equates to XHTML 1.0 Transitional but allows frameset content.
<! DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 frameset//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd" >
XHTML 1.1: This DTD is equivalent to XHTML 1.0 Strict, but allows models to be added (for example, to provide Ruby support for East Asian languages).
<! DOCTYPE HTML Public "-//w3c//dtd XHTML 1.1//en" "Http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" >