Home  >  Article  >  Web Front-end  >  How to use html5 header tag? Introduction to the role of html5 header tags

How to use html5 header tag? Introduction to the role of html5 header tags

寻∝梦
寻∝梦Original
2018-09-03 17:32:033977browse

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?

1aa9e5d373740b65a0cc8f0a02150c53 tag defines the header of a document or a part of a document. The

1aa9e5d373740b65a0cc8f0a02150c53 element should serve as a container for introductory content or a navigation link bar.

In a document, you can define multiple 1aa9e5d373740b65a0cc8f0a02150c53 elements.

Note: The 1aa9e5d373740b65a0cc8f0a02150c53 tag cannot be placed inside a c37f8231a37e88427e62669260f0074d, 208700f394e4cf40a7aa505373e0130b, or another 1aa9e5d373740b65a0cc8f0a02150c53 element.

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 "1aa9e5d373740b65a0cc8f0a02150c53" header tag. In the past, we often divided web pages into header, content, and bottom in div css layout. For large structures, we often use divs with ids for layout. The header is often laid out using 5ea15dbfb113feba8673e51289aaed4f16b28748ea4df4d9c2150843fecfba68 or f50071d45f8c5835406bcc272aea821216b28748ea4df4d9c2150843fecfba68. The characteristics are different from the traditional DIV layout. There is no need for div. tag, but add a new element tag.

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】

How to center the Chinese characters in the col tag in html? Basic use of html col tags (with examples included)

#How to scale html images to equal proportions? Summary of html img image scaling methods (with examples)

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!

Statement:
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