HTML: article
The <article> element marks content that can stand on its own, such as a blog post, news story, or forum post.
What you will learn
- When content is a good fit for
<article> - How
<article>differs from<section>and<div> - How to give an article a clear heading
Minimal example
<article>
<h2>How to start gardening</h2>
<p>A short, reusable post goes here.</p>
</article>If the content could be copied, syndicated, or understood as a separate item, <article> may describe it well. The element does not create a visual card by itself; use CSS for presentation.
Common mistakes
- Do not use
<article>only because you want a border or spacing. - Use
<section>for a themed group within a page when that group is not an independent item. - Use
<div>when no more meaningful semantic element fits.