Skip to main content
Albero Academy

Section vs Article vs Div

When to use each grouping element.

Semantic HTML7 min

Three grouping elements are easy to confuse. The rule of thumb: <article> for standalone content, <section> for a thematic part of something, and <div> only when neither fits.

The distinction

ElementUse when…
<article>The content is self-contained and could stand alone (a blog post, a product card, a comment)
<section>It's a thematic grouping within a page, usually with a heading
<div>You just need a styling/scripting wrapper with no semantic meaning

Key takeaways

  1. 01<article>: self-contained content that could stand alone (post, card, comment).
  2. 02<section>: a thematic part of a page, usually with a heading.
  3. 03<div>: a meaningless wrapper for styling/scripting only.
  4. 04Test for article: would it make sense syndicated on its own?

Finished this chapter?

Mark it complete to track your progress through HTML.