①<! doctype> (declaring document type):
<! Doctype> must be declared on the first line of the document, and before the HTML tag.
<! Doctype> is a rule page that uses that HTML version of an instruction, not a label, in HTML4.0.1, <! Doctype> declares that reference dtd,html4.0.1 is based on SGML (standard Universal Markup Language), that the DTD prescribes the rules for markup language, and that there is no rush to SGML in HTML5, so there is no reference to the DTD.
Attention
<! Doctype> no end tag, <! Doctype> not sensitive to case
Three kinds of <! are stipulated in the HTML4.0.1 The doctype> tag declaration, as shown in the following:
HTML 4.01 Strict
The DTD contains all the HTML elements and attributes, but does not include the display and deprecated elements (such as font). Frameset (framesets) is not allowed.
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01//en" "HTTP://WWW.W3.ORG/TR/HTML4/STRICT.DTD" >
HTML 4.01 Transitional
The DTD contains all the HTML elements and attributes, including both display and deprecated elements (such as font). Frameset (framesets) is not allowed.
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "HTTP://WWW.W3.ORG/TR/HTML4/LOOSE.DTD" >
HTML 4.01 Frameset
The DTD is equivalent to the HTML 4.01 transitional, but allows the frameset content.
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 frameset//en" "HTTP://WWW.W3.ORG/TR/HTML4/FRAMESET.DTD" >
And there's only one <! in HTML5. Doctype> statement:
<! DOCTYPE html>
②
Used to describe document types
③<body> Label
Document body, both the visual part of the Web page
Hyper Text Markup Language both HTML (Hypertext Markup Language),
Chinese code:
In the HTML page of the head declaration character is UTF-8 can solve the phenomenon of Chinese garbled in the browser.
<meta charset= "Utf-8" >
HTML5 Basic Chapter 1