From http://www.w3schools.com (Copyright Refsnes Data)
The <!DOCTYPE> declaration is the very first thing in your document, before the <html> tag. This tag tells the browser which HTML specification the document uses.
While there is 3 different doctypes in HTML 4.01, there is only one in HTML
5:
<!DOCTYPE HTML>
Note: The <!DOCTYPE> tag does not have an end tag!
Tip: The <!DOCTYPE> declaration is NOT case sensitive.
In HTML5 the doctype declaration is simply:
<!DOCTYPE HTML> |
It is important that you specify the doctype in all HTML documents, so that the browser knows what type of document to expect.
The doctype in HTML 4.01 required a reference to a DTD, because HTML 4.01 was based on SGML. HTML 5 is not based on SGML, and does not require a reference to a DTD, but need the doctype for browsers to behave as they should.
Attributes: NONE
From http://www.w3schools.com (Copyright Refsnes Data)