HTML5 the definition and stipulation of each label: section

Source: Internet
Author: User

The <section> label is a new label in HTML 5.

The consortium is defined as:




<section> label defines a section in a document. such as chapters, headers, footers, or other parts of a document.




The section element label is used to represent ordinary document content or application blocks. A section is usually made up of content and its headings ... However, the section element label is not an ordinary container element, and it is recommended that you use a DIV element instead of a section when a container needs to be defined directly or through a script definition behavior.




Usually not recommended for those with no title to use

; We can use the HTML5 Contour tool to check whether there are <section> containers on our page that do not contain a header section.
we can see that although the article has formal H1 and H2, in <section>, you can still use H1 for this content section as a title.

The following are a few taboos about using <section>:
Do not use <section> as a "hook" container for styling or behavior, which is <div> work.
Do not use <section> if <article>, <aside> or <nav> are more in line with the situation.
Do not use <section> for content blocks that do not have headers.  

<! DOCTYPE html>
<meta http-equiv= "Content-type" content= text/html; charset =utf-8 "/>
<title>html5 China http://www.html5cn.org/>
<body>
< Section>
       <p> details ... &/p>
</ Section>
<section>
       <p> Details ... &/p>
</section>
</body>

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.