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

What does the html5 section tag mean? Summary of usage of html5 section tag

寻∝梦
Release: 2018-08-29 16:36:38
Original
23392 people have browsed it

This article mainly introduces the definition of the HTML5 section tag and its usage. Finally, there is a case summary. Now let us start reading this article.

Let’s explain it first The meaning of the html5 section tag:

html5 section tag defines the section (section, section) in the document. Such as chapters, headers, footers, or other parts of the document.

Look at an example to help you understand the section tag better:

The section in the document explains the PRC:

<section>
  <h1>PHP中文网</h1>
  <p>这里是PHP中文网,网址是www.php.cn</p>
</section>
Copy after login

The example effect is as follows:

What does the html5 section tag mean? Summary of usage of html5 section tag

Now let’s talk about the points to note about the section tag:

section is not a tag specifically used as a container. If it is just used For setting styles or script processing, the special div

section should have titles (h1~6), but it is recommended to use article instead

A simple rule is that only elements The section element is only suitable when the content will be listed in the document outline.

The function of section is to divide the content on the page into sections, such as each titled section, functional area or article section. Do not confuse it with article, which has its own complete and independent content.

html5 Usage of section tag:

html5 introduces the

tag, which is used to describe the structure of the document. It has the same meaning as the
tag . But in certain circumstances, there are obvious differences between the two.

w3’s definition of

is: defining a section of a document (can have its own
and
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template