{{HTMLRef}}
HTML <article>
要素はドキュメント、ページ、アプリケーション、あるいはサイトの中で自己完結した構成物を表します。これは、例えば通信社によって独立して配信や再利用が可能であることを意図します。これはフォーラムへの投稿、雑誌や新聞の記事、ブログのエントリ、オブジェクト、その他のコンテンツで独立したアイテムが考えられるでしょう。
それぞれの <article>
は、主に子要素として見出し (<h1>
-<h6>
element) を含むことによって明確にするべきです。
使用上の注意:
<article>
要素を入れ子にした場合、内側の要素は外側の要素に関する記事を表します。例えばブログ投稿へのコメントは、ブログ投稿を表す<article>
内へ入れ子にした<article>
要素にできます。<article>
要素の著者情報は {{HTMLElement("address")}} 要素で提供できますが、入れ子にされた<article>
要素に適用してはいけません。<article>
要素の発行日時は、{{HTMLElement("time")}} 要素の {{htmlattrxref("datetime", "time")}} 属性で示すことができます。{{HTMLElement("time")}} 要素の {{htmlattrxref("pubdate", "time")}} 属性は W3C HTML 5 標準から外されましたので注意してください。
コンテンツカテゴリ | フローコンテンツ、セクショニングコンテンツ、パルパブルコンテンツ |
---|---|
許可された内容 | フローコンテンツ |
タグの省略 | {{no_tag_omission}} |
許可された親要素 | フローコンテンツを受け入れるすべての要素。<article> 要素を {{HTMLElement("address")}} 要素の子孫にしてはいけない点に注意してください。 |
DOM インターフェイス | {{domxref("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>
仕様
仕様書 | 策定状況 | コメント |
---|---|---|
{{SpecName('HTML WHATWG', 'sections.html#the-article-element', '<article>')}} | {{Spec2('HTML WHATWG')}} | |
{{SpecName('HTML5.1', 'sections.html#the-article-element', '<article>')}} | {{Spec2('HTML5.1')}} | |
{{SpecName('HTML5 W3C', 'sections.html#the-article-element', '<article>')}} | {{Spec2('HTML5 W3C')}} |
ブラウザ実装状況
{{CompatibilityTable}}
機能 | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
基本サポート | 5 | {{CompatGeckoDesktop("2.0")}} | 9.0 | 11.10 | 4.1 |
機能 | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
基本サポート | 2.2 | {{CompatGeckoMobile("2.0")}} | 9.0 | 11.0 | 4.2 |
関連情報
- 他のセクション関連要素: {{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")}}
- HTML5 文書のセクションとアウトライン