Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 534117 of <article>

  • 版本网址缩略名: HTML/Element/article
  • 版本标题: <article>
  • 版本 id: 534117
  • 创建于:
  • 创建者: hutuxu
  • 是否是当前版本?
  • 评论

修订内容

<article>元素表示文档、页面、应用或网站中的独立结构,其意在成为可独立分配的或可复用的结构,如在发布中,它可能是论坛帖子、杂志或新闻文章、博客、用户提交的评论、交互式组件,或者其他独立的内容项目。

使用说明:

  • <article>元素嵌套使用时,则该元素代表与外层元素有关的文章。例如,代表博客评论的<article>元素可嵌套在代表博客文章的<article>元素中。
  • <article>元素的作者信息可通过{{HTMLElement("address")}}元素提供,但是不适用于嵌套的<article>元素。
  • <article>元素的发布日期和时间可通过{{HTMLElement("time")}}元素的{{htmlattrxref("pubdate", "time")}}属性表示。

  • 内容分类 Flow content, sectioning content, palpable content.
  • 许可内容Flow content.
  • 标记省略 {{no_tag_omission}}
  • 父元素所有接受 flow content的元素。注意<article>元素不能成为{{HTMLElement("address")}}元素的子元素。
  • DOM interface {{domxref("HTMLElement")}}

属性

只具有全局属性

示例

<article>
  <h4>A really awesome article</h4>
  <p>Lots of awesome text.</p>
</article>

标准

Specification Status Comment
{{SpecName('HTML WHATWG', 'sections.html#the-article-element', '<article>')}} {{Spec2('HTML WHATWG')}}  
{{SpecName('HTML5 W3C', 'sections.html#the-article-element', '<article>')}} {{Spec2('HTML5 W3C')}}  

浏览器兼容

{{CompatibilityTable}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 5 {{CompatGeckoDesktop("2.0")}} 9.0 11.10 4.1
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support 2.2 {{CompatGeckoMobile("2.0")}} 9.0 11.0 5.0 (iOS 4.2)

相关文章

  • Others section-related elements: {{HTMLElement("body")}}, {{HTMLElement("nav")}}, {{HTMLElement("section")}}, {{HTMLElement("aside")}}, {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}}, {{HTMLElement("h6")}}, {{HTMLElement("hgroup")}}, {{HTMLElement("header")}}, {{HTMLElement("footer")}}, {{HTMLElement("address")}}
  • Sections and outlines of an HTML5 document.

{{ HTMLRef }}

修订版来源

<p><code style="font-size: 14px;">&lt;article&gt;</code><span style="line-height: 1.5;">元素表示文档、页面、应用或网站中的独立结构,其意在成为可独立分配的或可复用的结构,如在发布中,它可能是论坛帖子、杂志或新闻文章、博客、用户提交的评论、交互式组件,或者其他独立的内容项目。</span></p>
<div class="note">
 <p><strong>使用说明:</strong></p>
 <ul>
  <li>当<code>&lt;article&gt;</code>元素嵌套使用时,则该元素代表与外层元素有关的文章。例如,代表博客评论的<code>&lt;article&gt;</code>元素可嵌套在代表博客文章的<code>&lt;article&gt;</code>元素中。</li>
  <li><code>&lt;article&gt;</code>元素的作者信息可通过{{HTMLElement("address")}}元素提供,但是不适用于嵌套的<code>&lt;article&gt;</code>元素。</li>
  <li>
   <p style="margin-bottom: 0px;"><code>&lt;article&gt;</code>元素的发布日期和时间可通过{{HTMLElement("time")}}元素的{{htmlattrxref("pubdate", "time")}}属性表示。</p>
  </li>
 </ul>
</div>
<ul class="htmlelt">
 <li><dfn><a href="/en-US/docs/HTML/Content_categories" title="HTML/Content_categories">内容分类</a></dfn> <a href="/en-US/docs/HTML/Content_categories#Flow_content" title="HTML/Content categories#Flow content">Flow content</a>, sectioning content, palpable content.</li>
 <li><dfn>许可内容</dfn><a href="/en-US/docs/HTML/Content_categories#Flow_content" title="HTML/Content_categories#Flow_content">Flow content</a>.</li>
 <li><dfn>标记省略</dfn> {{no_tag_omission}}</li>
 <li><dfn>父元素</dfn>所有接受&nbsp;<a href="/en-US/docs/HTML/Content_categories#Flow_content" title="https://developer.mozilla.org/en/HTML/Content_categories#Flow_content">flow content</a>的元素。注意&lt;article&gt;元素不能成为{{HTMLElement("address")}}元素的子元素。</li>
 <li><dfn>DOM interface</dfn> {{domxref("HTMLElement")}}</li>
</ul>
<h2 id="Attributes">属性</h2>
<p><span style="line-height: 21px;">只具有<a href="https://developer.mozilla.org/en-US/docs/HTML/Global_attributes">全局属性</a>。</span></p>
<h2 id="Examples">示例</h2>
<pre class="brush: html">
&lt;article&gt;
  &lt;h4&gt;A really awesome article&lt;/h4&gt;
  &lt;p&gt;Lots of awesome text.&lt;/p&gt;
&lt;/article&gt;
</pre>
<h2 id="Specifications" name="Specifications">标准</h2>
<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('HTML WHATWG', 'sections.html#the-article-element', '&lt;article&gt;')}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', 'sections.html#the-article-element', '&lt;article&gt;')}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td>&nbsp;</td>
  </tr>
 </tbody>
</table>
<h2 id="Browser_compatibility">浏览器兼容</h2>
<p>{{CompatibilityTable}}</p>
<div id="compat-desktop">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Chrome</th>
    <th>Firefox (Gecko)</th>
    <th>Internet Explorer</th>
    <th>Opera</th>
    <th>Safari</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>5</td>
    <td>{{CompatGeckoDesktop("2.0")}}</td>
    <td>9.0</td>
    <td>11.10</td>
    <td>4.1</td>
   </tr>
  </tbody>
 </table>
</div>
<div id="compat-mobile">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Android</th>
    <th>Firefox Mobile (Gecko)</th>
    <th>IE Mobile</th>
    <th>Opera Mobile</th>
    <th>Safari Mobile</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>2.2</td>
    <td>{{CompatGeckoMobile("2.0")}}</td>
    <td>9.0</td>
    <td>11.0</td>
    <td>5.0 (iOS 4.2)</td>
   </tr>
  </tbody>
 </table>
</div>
<h2 id="See_also">相关文章</h2>
<ul>
 <li>Others section-related elements: {{HTMLElement("body")}}, {{HTMLElement("nav")}}, {{HTMLElement("section")}}, {{HTMLElement("aside")}}, {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}}, {{HTMLElement("h6")}}, {{HTMLElement("hgroup")}}, {{HTMLElement("header")}}, {{HTMLElement("footer")}}, {{HTMLElement("address")}}</li>
 <li class="last"><a class="deki-ns current" href="/en-US/docs/Sections_and_Outlines_of_an_HTML5_document" title="Sections and Outlines of an HTML5 document">Sections and outlines of an HTML5 document</a>.</li>
</ul>
<p>{{ HTMLRef }}</p>
恢复到这个版本