doctype Element
Description
The doctype
element is unique and in a category of its own.
You are required to begin every HTML document with a doctype
element.
This element tells the browser that it will be dealing with HTML.
Most browsers will still display your content correctly
if you omit the doctype
element.
The DTD that was required in HTML4 is obsolete in HTML5
There is only one way to use the doctype element in HTML5, and that is shown in the following.
<!DOCTYPE HTML>
This element tells the browser two things: it is dealing with HTML, and the version of the HTML specification of the content.
There is no end tag for this element. You simply put a single tag at the start of the document.