The doctype declaration of html5 is "<!DOCTYPE HTML>", which is an instruction used to inform the browser that the document uses the HTML specification. The doctype declaration must be on the first line in the HTML5 document, before the "" tag.
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
HTML5 DOCTYPE declaration
DOCTYPE is the abbreviation of document type.
The doctype declaration is not an HTML tag; rather, it is a document type tag, which is an instruction that tells the browser the version of markup in which the page was written.
The doctype declaration is a document type declaration in a standard universal markup language. It is used in web design to indicate what version of XHTML or HTML you are using.
html5 There is only one doctype declaration:
<!DOCTYPE HTML>
The declaration must be located on the first line in the HTML5 document, that is, before the tag. This tag tells the browser the HTML specification used by the document.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>文档标题</title> </head> <body> 文档内容...... </body> </html>
It is very important to specify the doctype in all HTML documents so that the browser understands the expected document type.
Explanation:
tag has no closing tag.
is not case sensitive.
Recommended tutorial: "html video tutorial"
The above is the detailed content of What is the doctype declaration of html5. For more information, please follow other related articles on the PHP Chinese website!