The best HTML <! DOCTYPE> declaration Tutorial In 2024, In this tutorial you can learn Examples,Browser Support,Tag definitions and instructions,Differences between HTML 4.01 and HTML5,HTML elements and Doctypes,Tips and Notes,Common DOCTYPE declaration,
All major browsers support <! DOCTYPE> declaration.
<! DOCTYPE> declaration in the document in the foremost position, before the <html> tag in.
<! DOCTYPE> declaration is not an HTML tag; it is used to tell the Web browser page which uses the HTML version.
In HTML 4.01, <! DOCTYPE> declaration required reference DTD (document type declaration), since HTML 4.01 is based on SGML (Standard Generalized Markup Language Standard Generalized Markup Language). DTD specifies the rules for markup language to ensure that the browser can properly render content.
HTML5 is not based on SGML, and therefore does not require a reference DTD.
Tip: Always give your HTML document to add a statement to ensure that the browser can know the document type <DOCTYPE!>.
HTML 4.01 specifies three different statements, namely <DOCTYPE!>: Strict, Transitional, and Frameset. HTML5 specifies only one of:
See HTML elements and legitimate Doctype , look at each HTML element which appears in the Doctype.
NOTE: <! DOCTYPE> tag has no end tag.
Tip: <! DOCTYPE> declaration is not case-sensitive.
Tip: Use verify the W3C check if you write HTML with a legitimate right of the DTD / XHTML document!
This DTD contains all HTML elements and attributes, but does not include representation or obsolete elements (such as font). Frame set is not allowed.
This DTD contains all HTML elements and attributes, including appearance or obsolete elements (such as font). Frame set is not allowed.
The DTD HTML 4.01 Transitional and the same, but allows the use of frameset content.
This DTD contains all HTML elements and attributes, but does not include representation or obsolete elements (such as font). Frame set is not allowed. Structure must be written according to the XML standard format.
This DTD contains all HTML elements and attributes, including appearance or obsolete elements (such as font). Frame set is not allowed. Structure must be written according to the XML standard format.
The DTD XHTML 1.0 Transitional and the same, but allows the use of frameset content.
The DTD XHTML with the same 1.0 Strict, but allows you to add a module (for example to provide ruby support for East Asian languages).