Based on a slight article, this article expands and summarizes the meaning of each tag and element in the commonly used head and the usage scenarios. There are many tags and elements in the head of HTML head, involving browser rendering of web pages, SEO, etc., and each browser kernel and domestic browser manufacturers have their own tag elements, which creates a lot of differences. In the era of mobile Internet, the head structure and the meta elements of mobile terminals are more important. It is the purpose of this article to understand the meaning of each tag and write a header tag that meets your needs. Based on a slight article, this article expands and summarizes the meanings of each label, element in the commonly used head and uses scenarios.
DOCTYPE
DOCTYPE(Document Type), the declaration is located at the front of the document, before the html tag, which tells the browser which HTML or XHTML specification to use for the document.
DTD (Document Type Definition) declaration starts with <!DOCTYPE>, is case-sensitive, and has nothing in front of it. If there is other content (except spaces), the browser will enable weird mode to render the web page in IE. Public DTD, name format is registered //Organization//Type tag // Language, registration refers to whether the organization is registered by the International Organization for Standardization (ISO), + means yes, - means no. Organization is the name of the organization, such as: W3C. The type is generally DTD. A tag is a description of the public text, that is, a unique descriptive name for the referenced public text, which may be followed by a version number. The last language is the ISO 639 language identifier of the DTD language, such as: EN means English and ZH means Chinese. XHTML 1.0 can declare three DTD types. Represents strict versions, transition versions, and framework-based HTML documents, respectively.
●HTML 4.01 strict
XML/HTML Code Copy content to clipboard