Learning Semantic HTML
Published
An article is content that can stand on its own.

The <article> element represents a self-contained composition that is meant to be independently distributable or reusable — a blog post, news story, forum post, product card, widget, or comment.
Give each article a clear heading. Add <header>, <footer>, and <time> when you need title metadata or a publication date. Prefer <section> when the block is only a thematic group inside a larger page.
Not deprecated. Sectioning content support has been stable across browsers since about July 2015.
<article> …heading and content…</article>Both start and end tags are required. Flow content is allowed inside. Do not place an <article> inside an <address>.
<article> has no element-specific attributes. Use the global attributes you need most often:
The <article> tag also supports the Global Attributes in HTML.
Switch common article patterns and see the structure update live.
Short, copy-ready snippets. Use Try It Yourself for a live editor.
A self-contained post with a heading and body text.
<article>
<h2>Why Learn HTML First?</h2>
<p>
HTML defines the structure and meaning of web content.
Master it before styling and scripting.
</p>
</article> <article>. Marks one standalone piece of content.Add publication metadata and author contact around the body.
<article>
<header>
<h2>Getting Started with Semantic HTML</h2>
<p>Published <time datetime="2026-10-28">October 28, 2026</time></p>
</header>
<p>
Elements like article, header, and footer help browsers
and search engines understand your content.
</p>
<footer>
<address>
Written by <a href="mailto:[email protected]">Mari Selvan</a>
</address>
</footer>
</article> <header> groups the title and intro metadata for this article.<time datetime="…"> exposes a machine-readable date.<address> in the footer is for contact for this article (not nested articles).Inner articles represent related items, such as comments on a post.
<article>
<h2>Favorite HTML Tips</h2>
<p>Share one tip that helped you learn HTML.</p>
<section>
<h3>Comments</h3>
<article>
<h4>Use real headings</h4>
<p>Skip fake bold text — use h2–h6.</p>
<footer>
<p>Posted <time datetime="2026-10-27">Oct 27</time> by Alex</p>
</footer>
</article>
<article>
<h4>Validate your markup</h4>
<p>Catch nesting mistakes early.</p>
<footer>
<p>Posted <time datetime="2026-10-28">Oct 28</time> by Sam</p>
</footer>
</article>
</section>
</article> <article> is the main post.<section> with its own heading.<article> — related to, but separate from, the post.h2 → h3 → h4).On a blog index, wrap each independent post in its own <article>.
<main>
<h1>Recent Posts</h1>
<article>
<h2>First Blog Post</h2>
<p>Intro to the first post.</p>
<p><a href="/blog/first">Read more</a></p>
</article>
<article>
<h2>Second Blog Post</h2>
<p>Intro to the second post.</p>
<p><a href="/blog/second">Read more</a></p>
</article>
</main> <article>. Do not wrap the whole feed in a single article.<main> (or a page header) outside the posts.Most mistakes mix up article with generic wrappers or skip headings.
If the block cannot stand alone (site chrome, a pure layout group), use <div> or <section> instead.
Landmark navigation works better when each article has a visible heading child.
Inner articles should be about the outer one (comments, chapters). Unrelated posts stay siblings.
<address>The HTML spec forbids <article> as a descendant of <address>.
Ask: “Could this be an RSS/Atom item?” If yes → article. If it is only a page chapter → section.
The <article> element is core HTML5 sectioning content in every major browser. It is not a Node.js, Deno, or Bun API.
Widely available since about July 2015. Chrome, Firefox, Safari, Edge, and Opera all support article as a sectioning element with an implicit ARIA role of article.
Bottom line: Safe to use everywhere for semantic self-contained content. Pair with headings for the best accessibility.
<article> marks content that can stand alone or be reused.h* child.One line: if it could be its own syndicated item, wrap it in <article>.
Browsers treat article as a block sectioning element. A typical user-agent idea:
article {
display: block;
} Visual cards, borders, and spacing come from your CSS — semantics stay in the HTML.
Mark complementary content such as sidebars and pull quotes.
11 people found this page helpful