The
The meaning of the statement
Only determines a correct document type, tags and cascading styles in Hypertext Markup Language or Extensible Hypertext Markup Language The table can take effect, even affecting the JavaScript script.
Compare the document type declaration
<!DOCTYPE html><!--html5文档类型声明--> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!--上是HTML 4.01 Strict-->
Explanation
references the DTD because HTML 4.01 is based on SGML. A DTD specifies the rules for a markup language so that browsers can render content correctly.
Explanation
is a way to define the structure and description of electronic documents International standard language for its content.
XML (Extensible Markup Language) is a subset of SGML, which became a W3C recommendation on February 10, 1998. XML is the most commonly used tool for data transfer between various applications.
An application under the Standard General Markup Language, HTML initially tried to become a subset of SGML, but HTML 4 did not strictly comply with SGML before standard. Later came HTML4, XHTML (HTML that conforms to the XML standard), both of which conform to the requirements of SGML.
So when using html5, when defining the document type at the beginning of the document, it can be directly simplified
<!DOCTYPE html>
HTML PUBLIC "-//W3C //DTD...
means: document type definition DTD (Document Type Definition)Document type definition is a set of The syntax rules of tags. It is part of the Standard Universal Markup Language and Extensible Markup Language version 1.0 specifications. It is a verification mechanism for documents to see whether the document conforms to the specification and whether the elements and tags are used. Correct.
##[Related recommendations 】
3. php. cn original html5 video tutorial
The above is the detailed content of Detailed introduction to the use of DOCTYPE tags. For more information, please follow other related articles on the PHP Chinese website!