New structure label for HTML5

Source: Internet
Author: User

In the previous HTML page, we basically used the div+css layout. While the search engine to crawl the content of the page, it can only guess the content of one of your div is the content of the article container, or the navigation module container, or the author introduced the container and so on. That is to say, the whole HTML document structure is not clear, HTML5 in order to solve this problem, specifically added: header, footer, navigation, article content and other structure-related structural element tags.

Before we talk about these new tags, let's look at the layout of a normal page:

We see very clearly, a normal page, there will be the head, navigation, article content, as well as the attachment of the right column, as well as the bottom of the module, and we are through the class to distinguish, and through the different CSS style to deal with. But the relative class is not a universal standard specification, the search engine can only guess the function of a certain part, the other is this page program to the visually impaired people to read, the document structure and content will not be very clear. The new layout that HTML5 new tags brings is the following scenario:

The associated HTML code is:
<body>
<nav>...</nav>
<article>
<section>...</section>
</article>
<aside>...</aside>
<footer>...</footer>
</body>

With the understanding of the above direct senses, we hit below to introduce the relevant structural tags in HTML5.

section label
  <section> tags, defining sections in the document. such as chapters, headers, footers, or other parts of the document. Typically used for section content, a new section is started in the document flow. It is used to represent common document content or application chunks, usually composed of content and its title. But the section element tag is not an ordinary container element, it represents a thematic content, usually with a title.

   When we describe a specific thing, we usually encourage the use of article instead of section, and when we use section, we can still use H1 as the caption, without worrying about where it is and whether it is used anywhere else. When a container needs to be defined directly or defined by a script, it is recommended to use a DIV element rather than a section.

 <section> what is
           <article>
          <p>section introduction </p>
&NBSP;&NBSP;&NBSP;&NBSP, .....
   </article>
 </section>

article tag
  <article> is a special section tag, It has a more explicit semantics than section, which represents a separate, complete block of related content that can be used independently of the rest of the page. For example, a full forum post, a blog post, a user comment, and so on. In general, article will have a title section (usually included in the header) and sometimes include footer. Article can be nested, the inner layer of the article external layer of the article label has affiliation. For example, a blog post can be displayed in article, and some comments can be embedded in the form of article.
 <article>
                         <time datetime= "2011-03-20" >2011.03.20</ Time>
     <p> article content details </p>
 </article>

Nav Label
The Nav tag represents a part of the page, a group of links that can be navigated as a page, where navigation elements are linked to other pages or other parts of the current page, making the HTML code more accurate in semantics and better for devices such as screen readers.
<nav>
<ul>
<li> Hou de it</li>
<li>FlyDragon</li>
<li>j Dragon Sky Surprise </li>
</ul>
</nav>

Aside label
Aside tags are used to load non-body content and are treated as a separate part of the page. It contains content that is separate from the main content of the page and can be deleted without affecting the content of the page, the chapters, or the information the page is about to convey. Examples include ads, groups of links, sidebar, and so on.

<aside>
<p> Hou de it</p>
</aside>

Header Label

Footer Label
The footer tag defines the footer of a section or document that contains information about a page, article, or part of the content, such as the author or date of the article. As a footer for a page, it typically contains copyrights, related files, and links. It is basically the same as the <footer>
[email protected] Hou de it
</footer>

Hgroup Label
The hgroup tag is a combination of the header elements (H1-H6) of a Web page or sections section. For example, in a section where you have successive H-series label elements, you can enclose them in hgroup.
The innovation of

Figure label
Used to group elements. Used for pictures and picture description combinations.
<figure>

<figcaption> here is a description of the picture </figcaption>
</figure>

Summary:
With the new structural labeling standards, HTML documents are clearer, more readable, better for SEO, and more conducive to visually impaired readers.

Reference: http://www.108js.com/article/article7/70249.html?id=1570

New structure label for HTML5

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.