HTML DOCTYPE Tags--DTDs document type declaration
DOCTYPE Label--defines the type of standard document
DOCTYPE
The label appears separately
- Description
-
- Document type, which causes the browser to load the Web page with the appropriate criteria and display
- The document type is defined in the first line of the HTML document, before the HTML tag
- The document does not define DOCTYPE, and the browser will not be able to learn the type of HTML or XHTML document, so it goes into chaos mode
- DOCTYPE, abbreviated as the
DTDs
abbreviation for the English document type, Chinese
HTML DOCTYPE Document Type example description
HTML4.01 document Transition definition types, documents defined by this type can use tags and elements in HTML to include tags that are not recommended by the user (e.g., font, b, etc.), and cannot use frames
<
!
DOCTYPE
HTML
PUBLIC
"
-//W3C//DTD HTML 4.01 Transitional//EN
"
"
http://www.w3.org/TR/html4/loose.dtd
"
>
HTML4.01 documents are strictly defined types, documents of this type can use tags and elements in HTML, cannot contain labels that are not recommended by the users (e.g., font, B, etc.) and cannot use frames
<
!
DOCTYPE
HTML
PUBLIC
"
-//W3C//DTD HTML 4.01//EN
"
"
http://www.w3.org/TR/html4/strict.dtd
"
>
The HTML4.01 document framework defines the type, which is equivalent to the HTML4.01 document transition definition type, but you can use the framework
<
!
DOCTYPE
HTML
PUBLIC
"
-//W3C//DTD HTML 4.01 Frameset//EN
"
"
http://www.w3.org/TR/html4/frameset.dtd
"
>
XHTML1.0 document Transition definition types, documents defined by this type can use tags and elements in HTML to include tags that are not recommended by the user (e.g., font, b, etc.), and cannot use frames
<
!
DOCTYPE
html
PUBLIC
"
-//W3C//DTD XHTML 1.0 Transitional//EN
"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
"
>
XHTML1.0 document strictly defined type, the document defined by this type can only use the tags and elements defined in the HTML, cannot contain tags not recommended by the list (for example: Font, b) (this type is used in the dream), the frame can not be used
<
!
DOCTYPE
html
PUBLIC
"
-//W3C//DTD XHTML 1.0 Strict//EN
"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
"
>
The XHTML1.0 document framework definition type is equivalent to the XHTML1.0 document transition definition type, but you can use the framework
<
!
DOCTYPE
html
PUBLIC
"
-//W3C//DTD XHTML 1.0 Frameset//EN
"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd
"
>
XHTML1.1 document strictly defined type, equivalent to XHTML1.0 document transition definition type
<
!
DOCTYPE
html
PUBLIC
"
-//W3C//DTD XHTML 1.1//EN
"
"
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd
"
>
HTML5 Document Type
<
!
DOCTYPE
html
>
The tags used in the HTML declaration are very special (different from the label syntax described earlier), using the <! Start, end without closing the character.
Browser performance mode (standards mode and quirks mode)
When the browser fetches a webpage from the server, it will display the page according to the DOCTYPE definition of the document, and if the document is correctly defined doctype the browser will enter the standard mode,standardsmode, or the browser will go into weird or promiscuous mode ( Quirks mode).
Browser development at the beginning of the Web page standards are not popular, so the browser has a unique page tag or attribute parsing mode, with the popularity of web standards in the future, the browser added to the new standard support (standards mode), but did not abandon the original mode of compatibility (Quirks mode), which is the source of multiple browser performance patterns.
Common browser performance modes include:
Ie
IE includes two modes: Standard mode (standards mode) with weird or promiscuous modes (Quirks mode).
IE ( S) and ie (Q) for short
FireFox
Firefox consists of three modes: Full standards mode, almost standards mode and quirks mode. For descriptions of these three models see: Mozilla's DOCTYPE sniffing
Opera
Opera consists of three modes: Quirks, standards and almost standards. Description of these three modes see: DOCTYPE switches support in Opera
html--Document Type Declaration