Explain the purpose of <header>, <nav>, <main>, <article>, <section>, <aside> and <footer>. How do you choose between <article> and <section>?
Show the explanation
Model answer.
- `<header>`: introductory content for the page or for a section: logo, title, maybe navigation.
- `<nav>`: a block of major navigation links (main menu, breadcrumbs, pagination), not every group of links.
- `<main>`: the page's unique main content. Use only one visible per page; it is what "skip to content" links target.
- `<article>`: a self-contained piece that makes sense on its own and could be syndicated: a blog post, news story, review, forum post or product card.
- `<section>`: a thematic grouping within a page or article, normally with its own heading.
- `<aside>`: content tangentially related to the main content: a sidebar, related links, a callout.
- `<footer>`: closing information for the page or a section: copyright, contact, author details.
<main>
<article>
<h1>B.Tech CSE at Example College</h1>
<section><h2>Fees</h2>…</section>
<section><h2>Placements</h2>…</section>
<aside>Compare with similar colleges…</aside>
</article>
</main>Article vs section: ask "would this make sense on its own, taken out of the page?" If yes, <article>; if it is just one part of something bigger, <section>. If you only need a styling hook with no meaning, use a <div>.
Original UniCircle question. Last reviewed 22 Oct 2026.
