section, article and aside
The three most argued about elements in HTML. There are clear tests for each, and once you know them the choice stops being a matter of taste.
-
HTML Basics
- What is HTML: The Structure Layer of Every Web Page
- HTML Document Structure: DOCTYPE, html, head and body
- Elements, Tags and Attributes: The Vocabulary of HTML
- HTML Comments: Notes That Ship With Your Code
- Block Level and Inline Elements
- Writing and Running Your First HTML Page
- How a Browser Turns Markup Into a Page
- Text and Formatting
- Links and Navigation
- Images and Media
- Lists
- Tables
-
Forms
- Form Structure: form, action and method
- Input Types: Text, Email, Number, Date and the Rest
- Labels: The Most Important Element in a Form
- Checkboxes, Radio Buttons and Grouping
- select, option, optgroup and datalist
- textarea, File Uploads and Hidden Fields
- Buttons: submit, reset and button
- Built In Form Validation
- GET or POST: What Happens When a Form Is Submitted
- Semantic HTML
- HTML5 Features
- Head and Metadata
- HTML with CSS
- HTML with JavaScript
- Accessibility
-
HTML SEO
- How Google Works: Crawling, Indexing and Ranking
- SEO Friendly HTML Structure
- Titles and Descriptions That Earn Clicks
- Headings and Content Structure for Search
- Internal Linking and Anchor Text
- robots.txt and XML Sitemaps
- Canonical URLs and Duplicate Content
- Structured Data and JSON-LD
- Image SEO
- Core Web Vitals and Mobile Friendliness
- DevTools and Debugging
- Editor Productivity
- HTML Best Practices
- HTML Projects
- Advanced Projects
- Practice and Exams
Concept
These three elements group content, and beginners choose between them by feel. There are actual tests.
| Element | Test |
|---|---|
article | Would this still make sense on its own, republished elsewhere? |
section | Is this a thematic part of something bigger, with a heading? |
aside | Could this be removed without damaging the main content? |
article
Self contained. If the content could be lifted out and syndicated - into a feed, an email, another site - and would still be complete, it is an article.
<article>
<header>
<h2>Reading a bus timetable</h2>
<p>By Meera Iyer, <time datetime="2026-03-02">2 March 2026</time></p>
</header>
<p>Every route in the city, and the two worth waiting for.</p>
<footer>
<p>Filed under <a href="/tags/transport">transport</a></p>
</footer>
</article>The name is broader than it sounds. All of these are articles: a blog post, a news story, a product card, a forum post, a user comment, a review, a job listing.
Articles nest, and comments are the standard example - each comment is itself self contained:
<article>
<h2>Reading a bus timetable</h2>
<p>...</p>
<section>
<h3>Comments</h3>
<article>
<h4>Arun</h4>
<p>Route 27 is faster after six.</p>
</article>
<article>
<h4>Sana</h4>
<p>Only on weekdays.</p>
</article>
</section>
</article>section
A thematic grouping within something larger. A chapter, a part of a page, a stage in a process.
The rule that settles most cases: a section should have a heading. If you cannot name it, you almost certainly want a div.
<main>
<h1>Admission 2026</h1>
<section>
<h2>Eligibility</h2>
<p>...</p>
</section>
<section>
<h2>Documents required</h2>
<p>...</p>
</section>
<section>
<h2>Fees</h2>
<p>...</p>
</section>
</main>A section becomes a region landmark only when it has an accessible name, from a heading or an aria-label. An unnamed section is not exposed as a landmark at all, which is another reason the heading matters.
aside
Tangentially related. Content that supports the main content but is not part of it, and whose removal would not damage it.
<!-- page level: a sidebar -->
<aside aria-label="Related courses">
<h2>Related courses</h2>
<ul>
<li><a href="/courses/design">Design</a></li>
</ul>
</aside>
<!-- inside an article: a pull quote or a note -->
<article>
<h2>Reading a bus timetable</h2>
<p>...</p>
<aside class="note">
<h3>A note on night services</h3>
<p>Night buses use a separate numbering scheme.</p>
</aside>
<p>...</p>
</article>aside is not the thing on the right. Position is a CSS decision. An aside is content that is genuinely secondary, wherever it happens to be drawn.
A decision walk through
For any block of content, ask in order:
- Is it self contained and syndicatable? Yes, it is an
article. - Is it secondary to the surrounding content? Yes, it is an
aside. - Is it a named thematic part of a bigger whole? Yes, it is a
section. - Is it a group of items? Yes, it is a
ulorol. - Is it only there for layout or styling? Yes, it is a
div.
Example: a page using all three
<main>
<h1>Design course</h1>
<section>
<h2>What you will study</h2>
<p>...</p>
</section>
<section>
<h2>Student work</h2>
<article>
<h3>A wayfinding system for the old market</h3>
<p>...</p>
</article>
<article>
<h3>Redrawing the city bus map</h3>
<p>...</p>
</article>
</section>
</main>
<aside aria-label="Course details">
<h2>At a glance</h2>
<dl>
<dt>Duration</dt><dd>Three years</dd>
<dt>Intake</dt><dd>Sixty students</dd>
</dl>
</aside>Important rules
- A
sectionwithout a heading is usually adiv. - An
articleshould also carry a heading. - Articles may nest; a nested article belongs to its parent.
sectionis not a styling wrapper. Usedivfor that.- An unnamed
sectionis not exposed as a landmark. asideis about relationship, not position.
Common mistakes
- Using
sectioneverywhere adivwas used before, out of a vague sense that it is more modern. - Sections with no headings, producing an outline full of unnamed regions.
- Using
articlefor any block of text, including page furniture. - Treating
asideas the sidebar element. - Wrapping the whole page in one
section. - Nesting a
maininside anarticle.
Best practices
- Apply the tests in order and take the first that fits.
- Give every
sectionand everyarticlea heading. - Label an
asidewhen the page has more than one. - Prefer
divwithout embarrassment when nothing meaningful applies. - Read the heading outline afterwards; it exposes wrong choices immediately.
Practice
- Mark up a blog post page with a header, an article, a comments section of nested articles and a sidebar.
- Take a page full of
sectionelements and reclassify each one using the tests. - Write a product card and justify why it is an
article. - Find a
sectionwith no heading in your own work and decide what it should be.