- Text description page between
- The text between
- The text between <body> and </body> is visible in the page content
The following are the highlights: DTD document model
Disclaimer: <! DOCTYPE >
HTML also has a number of different versions, only the exact HTML version used in the page is fully understood, and the browser can display the HTML page exactly. This is <!. The role of DOCTYPE >.
the difference between having and not
- Backcompat: Standard compatibility mode is not turned on (or is called "weird" mode [Quirks modes], promiscuous mode)
- Css1compat: Standard compatibility mode is turned on (or called strict mode [standards Mode/strict mode])
This property will be recognized and used by the browser, but if your page does not have a DOCTYPE declaration, then compatmode default is Backcompat, which is the beginning of the devil-the browser in its own way to parse the rendered page, then the different browsers will show different styles. If your page is added, then it is equivalent to opening the standard mode, then the browser will have to honestly interpret the rendering page according to the standards of the Web, so that your page in all browsers will display a look.
What's the use?
DOCTYPE tells the browser what HTML or XHTML specifications are used to parse the HTML document, and the DTD file contains tags, attributes, properties, and constraint rules.
Three types of DTD document models
The Common <! DOCTYPE > statement
HTML5: Development for PC-side and mobile-side
XHTML1.0 Transitional (over version): For PC-side development
HTML Skeleton--DTD Document model