1. Tell the browser what html or xhtml specification to use to parse html documents
2. It has an impact on the browser's rendering mode; different rendering modes will affect the browser's parsing of CSS code and even JavaScript scripts, so Doctype is very critical, especially in IE series browsers, the rendering mode of HTML pages determined by DOCTYPE is crucial.
Two rendering modes:BackCompat: Standard compatibility mode is not enabled (or called weird mode [Quirks mode], mixed mode)
CSS1Compat: Standard compatibility mode is enabled (or strict mode [Standards mode/Strict mode])