DOCTYPE

What is DOCTYPE:

    Before understanding what a DOCTYPE is, you must first know what a DTD is:

        DTD (document type definition, document type definition) is a series of grammar rules used to define the document type of XML or (X)HTML, the browser will use it to determine the document type, decide which protocol to use for parsing, and switch browser mode.

The role of DOCTYPE:

        DOCTYPE is used to declare the document type and DTD specification. One of the main uses is to check the validity of the file. If the code of the file is invalid, some errors will occur when the browser parses it.

In short: DOCTYPE is used to declare the document type, and the browser will use it to determine which protocol to use to parse the document.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325590867&siteId=291194637