Thematic grouping within articles or pages. Learn more →
<article> ElementThe <article> element represents a self-contained composition that could be independently distributed or reused. Examples include blog posts, news articles, forum posts, product cards, user comments, or interactive widgets. An article should make sense on its own when removed from the rest of the page.
<article> <!-- Self-contained content --></article>The <article> element has no element-specific attributes.
This element supports all global attributes.
A complete blog post with header, content sections, and footer:
A news article with attribution and publication info:
Each product as an independent article:
A forum post where both the post and comments are articles:
Individual social media posts as articles:
A self-contained interactive widget:
Understanding when to use <article> vs. <section>:
<!-- Use <article> for independent content --><article> <h2>Complete Blog Post</h2> <p>This could stand alone in an RSS feed...</p></article>
<!-- Use <section> within an article to organize content --><article> <h2>Blog Post Title</h2> <section> <h3>Introduction</h3> <p>Content...</p> </section> <section> <h3>Main Points</h3> <p>Content...</p> </section></article>
<!-- Articles can be nested --><article class="blog-post"> <h2>Main Article</h2> <p>Article content...</p>
<section class="comments"> <h3>Comments</h3> <article class="comment"> <p>First comment...</p> </article> <article class="comment"> <p>Second comment...</p> </article> </section></article>Every article should have a heading (h1-h6):
<!-- Good: Article with heading --><article> <h2>Article Title</h2> <p>Content...</p></article>
<!-- Avoid: Article without heading --><article> <p>Content without a title...</p></article>Structure articles with header and footer when appropriate:
<article> <header> <h2>Article Title</h2> <p class="byline">By Author Name</p> <time datetime="2025-03-15">March 15, 2025</time> </header>
<p>Main content...</p>
<footer> <p>Categories: Tech, Web Development</p> <p>Share this article</p> </footer></article>Articles can be nested when appropriate (e.g., comments):
<article class="blog-post"> <h2>Main Post</h2> <p>Post content...</p>
<!-- Nested articles for comments --> <article class="comment"> <h3>Comment Title</h3> <p>Comment content...</p> </article></article>Enhance articles with structured data:
<article itemscope itemtype="https://schema.org/BlogPosting"> <header> <h2 itemprop="headline">Article Title</h2> <p>By <span itemprop="author">Jane Doe</span></p> <time itemprop="datePublished" datetime="2025-03-15">March 15, 2025</time> </header>
<div itemprop="articleBody"> <p>Article content...</p> </div></article>The <article> element has an implicit ARIA role of article:
<!-- These are equivalent --><article>Content</article><div role="article">Content</div>For better accessibility, especially with multiple articles, use aria-labelledby or aria-label:
<!-- Using aria-labelledby --><article aria-labelledby="article-title"> <h2 id="article-title">Article Title</h2> <p>Content...</p></article>
<!-- Using aria-label when there's no visible heading --><article aria-label="Weather widget for San Francisco"> <!-- Widget content --></article>Ensure articles appear in logical reading order in the DOM:
<!-- Good: Logical order --><main> <article><!-- First article --></article> <article><!-- Second article --></article> <article><!-- Third article --></article></main>| Browser | Version |
|---|---|
| Chrome | 5+ |
| Firefox | 4+ |
| Safari | 5+ |
| Edge | All versions |
| IE | 9+ |
Thematic grouping within articles or pages. Learn more →
The main content area that may contain articles. Learn more →
Introductory content for articles. Learn more →
Footer content for articles. Learn more →
<!-- Wrong: Article for non-independent content --><article> <img src="logo.png" alt="Logo"></article>
<article> <nav>Navigation links</nav></article>
<!-- Correct: Article for self-contained content --><article> <h2>Blog Post Title</h2> <p>Complete, independent content...</p></article><!-- Wrong: Using article like section --><article> <article>Introduction section</article> <article>Main content section</article> <article>Conclusion section</article></article>
<!-- Correct: Sections within article --><article> <section> <h2>Introduction</h2> <p>Content...</p> </section> <section> <h2>Main Content</h2> <p>Content...</p> </section></article><!-- Wrong: No heading --><article> <p>Content without a title...</p></article>
<!-- Correct: Include heading --><article> <h2>Article Title</h2> <p>Content...</p></article>