Home > Web Front-end > H5 Tutorial > body text

What is the doctype declaration of html5

青灯夜游
Release: 2021-12-03 15:12:07
Original
8789 people have browsed it

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.

What is the doctype declaration of html5

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>
Copy after login

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template