Introduction to Doctypes.
Doctypes - short for 'document type' - help browsers to understand the version of HTML the document is written in for better interpretability. Doctype declarations are not HTML tags and belong at the very top of a document. This topic explains the structure and declaration of various doctypes in HTML.
📄️ Adding the Doctype
The ` declaration should always be included at the top of the HTML document, before the ` tag.
📄️ HTML 5 Doctype
HTML5 is not based on SGML, and therefore does not require a reference to a DTD.
📄️ Remarks
The `` declaration is not an HTML tag. It is used for specifying which version of HTML the document is using. This is referred to as the document type declaration (DTD).