HTML5 Semantic Tags

Source: Internet
Author: User

HTML5 semantic Label structure tag HTML5 There are new tags added, these tags make HTML more semantic, this article mainly mentions the tags are: section, article, header, nav, footer, Hgroup, aside.  section tags  <section> tags, define sections in the document. such as chapters, headers, footers, or other parts of the document. 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 title without worrying about where it is and whether it is used elsewhere. 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.  article tag  <article> is a special section tag that has more explicit semantics than section and represents a separate, complete block of relevant 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. The  nav tag  nav tag represents a part of a page that is 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><a href= "http://www.rainleaves.com" > Home </a></li><li ><a href= "#" >html+css</a></li><li><a href= "#" >jquery</a></li><li ><a href= "#" &Gt;seo optimization </a></li><li><a href= "#" >wordpress Tutorial </a></li></ul></nav > But not all of the link groups on the page need to be placed in the NAV tag, which consists mainly of the main navigation blocks of the page. For example, we usually put a set of links in the footer of our website, including terms of service, website descriptions, copyright notices, etc., and we usually use footer instead of NAV.   A page can contain multiple NAV labels as a navigation for the whole or different parts of the page. In the following example, there are two nav tags, one for the main navigation of the Web site, and the other for the navigation of the current page itself as a secondary link.  

HTML5 Semantic Tags

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.