Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the doctype statements of html5?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "what is the doctype statement of html5". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the doctype statements of html5".

Html5 has only one doctype declaration, the syntax ""; and the "" declaration must be on the first line of the HTML5 document, that is, before the "" tag, which tells the browser that the document uses the HTML specification.

The operating environment of this tutorial: windows7 system, HTML5 version, Dell G3 computer.

Doctype declaration in html5

There are three declarations in HTML 4.01, but only one in HTML 5, and it's very simple:

The declaration must be on the first line of the HTML5 document, that is, before the tag. This tag tells the browser the HTML specification used by the document.

The doctype declaration is not part of the HTML tag; it is an instruction that tells the browser the version of the tag used to write the page.

It is important to specify doctype in all HTML documents so that browsers can understand the expected document type.

The tag does not end the tag and is not case-sensitive.

Extended knowledge: doctype declaration in HTML 4.01

HTML 4.01 Strict

The DTD contains all HTML elements and attributes, but does not include illustrative and deprecated elements (such as font). Framesets (Framesets) are not allowed.

HTML 4.01 Transitional

The DTD contains all HTML elements and attributes, including illustrative and deprecated elements (such as font). Framesets (Framesets) are not allowed.

HTML 4.01 Frameset

This DTD is equivalent to HTML 4.01 Transitional, but allows frameset content.

Thank you for your reading, the above is the content of "what is the doctype statement of html5". After the study of this article, I believe you have a deeper understanding of what the doctype statement of html5 has, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report