Home  >  Article  >  Web Front-end  >  How to use header tags in H5

How to use header tags in H5

php中世界最好的语言
php中世界最好的语言Original
2018-01-09 09:25:323452browse

This time I will show you how to use the header tag in H5. How to use the header tag in H5? What are the precautions when using header tags in H5? The following is a practical case, let’s take a look.

The1aa9e5d373740b65a0cc8f0a02150c53 tag defines the header of the document, usually some guidance and navigation information. It is not limited to being written in the header of the web page, but can also be written in the content of the web page.
In the new standard, the header tag is defined as follows:

"A group of introductory or navigational aids."
Basically means "a group of introductory navigation-related auxiliary content." Literally understood, the header tag not only defines the content of the page header, but can also define the introduction of other content below the page header. This is not completely consistent with our traditional page header definition.
Usually the 1aa9e5d373740b65a0cc8f0a02150c53 tag contains at least (but is not limited to) a header tag (4a249f0d628e2318394fd9b75b4636b1-4e9ee319e0fa4abc21ff286eeb145ecc), and can also include the d8eccd9ed644b68a6460a2bb84548c82 tag, and can also include table content, logo, search Forms, c787b9a589a3ece771e842a6176cf8e9 navigation, etc.

<header>  
 <h1>1</h1>  
 <p>专注于web前端开发</p>  
</header>  
<article>  
 <header>  
  <h1>html5语义化标签之结构标签</h1>  
  <p>article、section、hgroup、aside、nav...</p>  
 </header>  
 <p>...这里面包含很多东西...</p>  
</article>

In the above structure, we can see that using header we define the title and content of an article. The header tag used here is not the header of the page, but the header of the article.

So in HTML5, the use of headers is more flexible, and you can define and organize the document structure according to your needs.

Similarly, when structuring a page, the header tag is generally placed at the top of the page, but if you want to place it on the left, right or even bottom, it doesn’t matter. The tag only defines its location on the page. Role, not location. Of course, it is more based on search engine optimization principles. Important content is finally advanced when structuring the page.
Finally, since header is a block element in HTML5, if we want to use it in most mainstream browsers, it is best to define CSS, as follows.

header { display:block;}

I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!

Related reading:

How to use regular expressionsCatch the list data of the blog garden

What kind of regular expressions The formula can display highlight highlighting

How to use jquery's ajax to asynchronously submit form data

The above is the detailed content of How to use header tags in H5. 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