HTML doctype declaration
<!doctype> in html
In the previous blog, we read about Comment Tag in HTML. Here in this blog, we will cover the Doctype Declaration in html.
The doctype declaration mandatory to be the very first thing in your HTML document, before the html tag.
The declaration is not an HTML tag; it tells to the web browser about what version of HTML the web page is using in the document.
In HTML 4.01, the declaration refers to a DTD (document type definition), because HTML 4.01 was based on SGML (Standard Generalized Markup Language). The DTD defines the rules for the markup language, so that the browsers render the correct content.
Tip: Always include the declaration to your HTML document, so that the browser easily identifies what type of version we are using.
NOTE: In below figure, Doctype declaration is mentioned in the box.