Article introduction of Wulin.com (www.vevb.com): !DOCTYPE statement is the first ingredient in the document, before the label. This tag informs the browser of the HTML specification used by the document.
Definition and usage
The <!DOCTYPE> declaration is the first ingredient in the document, before the <html> tag. This tag informs the browser of the HTML specification used by the document.
Differences between HTML 4.01 and HTML 5
There are 3 different document types in HTML 4.01, and only one in HTML 5: <!DOCTYPE HTML>.
Tips and comments:
Note: <!DOCTYPE> tag has no end tag!
Tip: <!DOCTYPE> is not case sensitive.
HTML 5
In HTML5, the document type declaration is simple:
<!DOCTYPE HTML>It is important to specify the document type in all HTML documents so that the browser can understand the expected document type.
The doctype in HTML 4.01 requires a DTD reference because HTML 4.01 is based on SGML. HTML 5 is not based on SGML, and does not require reference to DTDs, but requires declaring document types for browsers to run the way they should.