This article mainly introduces the explanation of the html5 header tag and the introduction of the role of the html5 header tag. Finally, it also provides a summary of the header tag. Let’s read this article together
First of all, we must first understand how to use the html5 header tag?
In a document, you can define multiple
Note: The
Introduction to the basic usage of the header tag element:
Before the HTML5 version, it was customary to use div tags to layout web pages. In HTML5, a new header tag element is added based on the DIV tag. Also called "
It is recognized that "header" is a commonly used name in HTML layout, so a new header tag element is added to HTML5. You can understand why the header is added as a label element in html5.
In addition to using the header tag directly, you can also set class or id to the header.
html5 The syntax structure of the header tag:
The header tag element is used the same as the div. There is a beginning and there is a closure.
<header>php中文网</header>
1. Don’t give id or class directly
<header>头部内容区</header>
2. Set id
<header id=”divcss5”>头部内容区</header>
3. Set class
<header class=”divcss5”>头部内容区</header>
4. Features: like The DIV tag element can be used multiple times, and id or class can be used to set different styles in different places.
html5 Introduction to the role of the header tag:
Because the header tag is a new tag element in HTML5, it is not supported by older versions of browsers and requires IE9 or above browsers. Only supported by the latest browsers such as Google Chrome. Of course, domestic browsers such as 360 Browser, Baidu Browser, and Aoyou Browser all use the IE kernel that comes with the system, so domestic browsers are actually the same version as the IE version that comes with your system, so your IE browser is IE9 or above. The version is naturally compatible with the new tag elements of HTML5.
Summary of the html5 header tag:
PHP Chinese website recommends that in order to be compatible from IE6 to the latest version of IE, it is not time to use html5 new tags for ordinary WEB web page layouts element. It is recommended to use regular DIV CSS to layout html web pages. I usually know that HTML5 has these new tag elements, and I know that the usage method is essentially the same as DIV. Of course, you will naturally use DIV CSS layout and the new element tags in HTML5.
Okay, the above is the introduction and function explanation of the html5 header tag in this article. If you have any questions, you can ask below.
【Editor's Recommendation】
The above is the detailed content of How to use html5 header tag? Introduction to the role of html5 header tags. For more information, please follow other related articles on the PHP Chinese website!