Skip to main content
InterviewHubPRO
Section Overview
Q3

Question 3 of 50

Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

6%
HTML5 & Web APIs (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

What is the difference between `<article>` and `<section>`?

junior LevelCode ExamplehtmlBasic

In Simple Words:

  • <article>: Represents a complete, self-contained piece of content that could be distributed and syndicated independently (e.g., a blog post, news story, forum comment, or product card). If you can extract it and publish it in an RSS feed or on another website and it still makes sense on its own, use <article>.
  • <section>: Represents a thematic grouping of content, typically with a heading. It is part of a larger whole (e.g., "Introduction", "Features", "Pricing" sections of a single page).
html
<!-- An article containing thematic sections -->
<article>
  <h1>Designing Distributed Systems</h1>
  <section>
    <h2>1. The CAP Theorem</h2>
    <p>Consistency, Availability, and Partition Tolerance...</p>
  </section>
  <section>
    <h2>2. Consensus Algorithms</h2>
    <p>Raft and Paxos...</p>
  </section>
</article>