Summary
The HTML Article
Element (<article>) 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, 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.
Usage notes:
- 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 {{HTMLElement("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 {{htmlattrxref("datetime", "time")}} attribute of a {{HTMLElement("time")}} element. Note that the {{htmlattrxref("pubdate", "time")}} attribute of {{HTMLElement("time")}} is no longer a part of the W3C HTML 5 standard.
- Content categories Flow content, sectioning content, palpable content.
- Permitted contentFlow content.
- Tag omission {{no_tag_omission}}
- Permitted parent elements Any element that accepts flow content. Note that an
<article>
element must not be a descendant of an {{HTMLElement("address")}} element. - DOM interface {{domxref("HTMLElement")}}
Attributes
This element only includes the global attributes.
Examples
<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>
Specifications
Specification | Status | Comment |
---|---|---|
{{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')}} |
Browser compatibility
{{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 | 4.2 |
See also
- Other 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 }}