HTML · The document layer
What is the difference between section, article and aside?
Short answer
article is independently distributable content, section is a themed group that usually has a heading, and aside is tangential content. Use them by meaning, not by visual layout.
These three elements are easy to confuse because they can look identical with CSS. The decision should come from the content's role and whether it would make sense on its own.
A practical test
- article: would this content still make sense syndicated, shared or reused elsewhere? Examples are a blog post, a product card or a forum thread
- section: is this a thematic group that needs a heading to make sense? Examples are chapters, tabs or a pricing tier
- aside: is this related but not essential to the main content? Examples are pull quotes, side notes or related links
<main>
<article>
<h1>Shipping accessible forms</h1>
<p>Forms are where accessibility often breaks down.</p>
<section>
<h2>Labels</h2>
<p>Every control needs an accessible name.</p>
</section>
<aside>
<h2>Related reading</h2>
<a href="/aria">ARIA basics</a>
</aside>
</article>
</main>A section without a heading is usually a sign that it is just a styling wrapper. If you only need a container for layout, a div is the honest choice.
Follow-ups you should expect
Interviewers use these to check whether the first answer was understanding or memorisation.
- 1When is a div better than a section?
- 2Can an article contain sections?
- 3Should every section have a heading?
- 4What makes content independently distributable?
Say it in the interview
I treat article as content that could stand alone or be syndicated, such as a blog post or product card. Section is a thematic group that usually needs a heading to make sense. Aside is related but non-essential content, like a side note or related links. If I only need a layout wrapper with no meaning, I use a div instead of forcing a section.
Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.
Related questions
Reading is step one
Now say it out loud.
Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live HTML mock interview and get scored feedback on depth, clarity and confidence.