Course contentsShow
← Web Development
Lesson 1000 of 2,98218. Accessibility FundamentalsFree lesson

Article vs Section vs Div

Understand when to use semantic containers versus generic divs for meaningful content grouping.

Article vs Section vs Div

You'll learn when to use semantic containers versus generic divs to give your content meaningful structure.

The Core Difference

HTML gives you three common containers: <article>, <section>, and <div>. They all group content, but only the first two carry semantic meaning that helps screen readers and search engines understand your page structure.

Think of it like organizing a bookshelf:

  • <article> is a self-contained book that makes sense on its own (blog post, news article, product card)
  • <section> is a chapter within a larger work — thematically grouped content that needs context (comments section, product features, article chapters)
  • <div> is just a plain cardboard box with no label — use it for styling or layout when there's no semantic meaning

When to Use Each

Use <article> when the content could be:

  • Syndicated or shared independently
  • Read in isolation and still make complete sense
  • Examples: blog posts, forum posts, product listings, news stories

Use <section> when:

  • Grouping related content under a theme
  • You'd naturally give it a heading
  • It's part of a larger whole
  • Examples: "About Us" section, chapter in documentation, tabbed content areas

Use <div> when:

  • You need a container purely for styling or JavaScript
  • No semantic relationship exists
  • Examples: layout wrappers, grid containers, style hooks

Why This Matters for Accessibility

Screen readers announce semantic elements differently. When a user lands on an <article>, their assistive technology might say "article region," immediately conveying structure. A <div> provides no such context — it's invisible to the document outline.

Key Takeaway: Choose <article> for independent content, <section> for thematic groups within a document, and <div> only when you need a non-semantic container for styling or scripting.