HTML article和section

The HTML <article> element represents a self-contained composition in a document, page, application, or site, which is intended to be independently distributable or reusable (e.g., in syndication). This could be a forum post, a magazine or newspaper article, a blog entry, an object, or any other independent item of content. Each <article> should be identified, typically by including a heading (<h1>-<h6> element) as a child of the <article> element.When an <article> element is nested, the inner element represents an article related to the outer element. For example, the comments of a blog post can be <article> elements nested in the <article> representing the blog post. Author information of an <article> element can be provided through the <address> element, but it doesn't apply to nested <article> elements. The publication date and time of an <article> element can be described using the datetime attribute of a <time> element. Note that the pubdate attribute of <time> is no longer a part of the W3C HTML 5 standard.


The HTML <section> element represents a generic section of a document, i.e., a thematic grouping of content, typically with a heading. Each <section> should be identified, typically by including a heading (<h1>-<h6> element) as a child of the <section> element.

猜你喜欢

转载自blog.csdn.net/yujiayinshi/article/details/50464932