<article>
元素表示文档、页面、应用或网站中的独立结构,其意在成为可独立分配的或可复用的结构,如在发布中,它可能是论坛帖子、杂志或新闻文章、博客、用户提交的评论、交互式组件,或者其他独立的内容项目。
使用说明:
- 内容分类 Flow content, sectioning content, palpable content.
- 许可内容Flow content.
- 标记省略 None, both the starting and ending tag are mandatory.
- 父元素所有接受 flow content的元素。注意<article>元素不能成为
<address>
元素的子元素。 - DOM interface
HTMLElement
属性
只具有全局属性。
示例
<article class="film_review">
<header>
<h2>Jurassic Park</h2>
</header>
<section class="main_review">
<p>Dinos were great!</p>
</section>
<section class="user_reviews">
<article class="user_review">
<p>Way too scary for me.</p>
<footer>
<p>
Posted on <time datetime="2015-05-16 19:00">May 16</time> by Lisa.
</p>
</footer>
</article>
<article class="user_review">
<p>I agree, dinos are my favorite.</p>
<footer>
<p>
Posted on <time datetime="2015-05-17 19:00">May 17</time> by Tom.
</p>
</footer>
</article>
</section>
<footer>
<p>
Posted on <time datetime="2015-05-15 19:00">May 15</time> by Staff.
</p>
</footer>
</article>
标准
Specification | Status | Comment |
---|---|---|
WHATWG HTML Living Standard <article> |
Living Standard | |
HTML5 <article> |
Recommendation |
浏览器兼容
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 5 | 4.0 (2.0) | 9.0 | 11.10 | 4.1 |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | 2.2 | 4.0 (2.0) | 9.0 | 11.0 | 5.0 (iOS 4.2) |
相关文章
- Others section-related elements:
<body>
,<nav>
,<section>
,<aside>
,<h1>
,<h2>
,<h3>
,<h4>
,<h5>
,<h6>
,<hgroup>
,<header>
,<footer>
,<address>
- Sections and outlines of an HTML5 document.