HTML Tags
HTML5 <article> Tag
The <article> tag represents a self-contained piece of content that could stand on its own, such as a blog post, news story, or comment. It is a semantic HTML5 element.
The <article> Tag
The <article> element represents a complete, self-contained composition that is independently distributable or reusable, for example a forum post, magazine article, blog entry, or product card. A good test: if the content would make sense syndicated on its own, it belongs in an <article>.
It is a block-level semantic element. Articles can be nested (a comment inside a blog post), and each should usually contain a heading.
Syntax
<article>
<h2>Title</h2>
<p>Self-contained content...</p>
</article>Example
<!DOCTYPE html>
<html>
<body>
<article>
<h2>Learning HTML in 2026</h2>
<p>HTML is the foundation of the web. This post explains why.</p>
<p>Published on July 3, 2026.</p>
</article>
</body>
</html>More Examples
<!DOCTYPE html>
<html>
<body>
<article>
<h2>Main Post</h2>
<p>The main article content.</p>
<article>
<h3>A reader comment</h3>
<p>Great article, thanks for sharing!</p>
</article>
</article>
</body>
</html>Use <article> for content that makes sense on its own. Use <section> for thematic grouping and <div> for purely presentational containers.
Key Takeaways
- <article> holds self-contained, distributable content.
- Good examples: blog posts, news items, comments, cards.
- It is a semantic block-level element.
- Articles can be nested and should include a heading.
- It improves accessibility and SEO structure.
