section
A thematic part of a page, usually with a heading.
Learn section, article, aside as part of the HTML element system: when to use it, how it fits inside a document and what mistakes to avoid.
Sections
section, article and aside help divide content into meaningful blocks. They should not be used only because you need a box for CSS.
A section usually needs a heading. An article should make sense as a standalone piece. An aside should be related but secondary.
section, article, aside. Meaningful content regions instead of neutral wrappers. Syntax in context
If the content is a major page part, use section. If it can stand alone, consider article. If it is secondary, use aside.
<section> <h2>Frontend fundamentals</h2> <p>HTML, CSS and JavaScript work together.</p> </section> <article> <h2>New lesson: HTML sections</h2> <p>This update can stand on its own.</p> </article>
Good versus weak
<section> <h2>Frontend fundamentals</h2> <p>HTML, CSS and JavaScript work together.</p> </section> <article> <h2>New lesson: HTML sections</h2> <p>This update can stand on its own.</p> </article>
<section>
<section>
<section>Random wrapper for spacing</section>
</section>
</section>
Rules that matter
A section without a heading is often just a div in disguise.
Use article when the block could be reused independently.
Do not put primary page content in aside.
Use div when you only need a neutral styling wrapper.
Production thinking
These elements exist so a document can explain its own structure. A section groups one theme, an article can stand on its own and an aside marks supporting content that is related but not the main flow.
Clear section headings help users scan the page and understand where one topic ends and another begins.
Sectioning elements are excellent in content-heavy pages, documentation, blogs, courses and dashboards with meaningful panels.
Live code lab
Edit the HTML or CSS, then use Run to refresh the preview. The preview is isolated, so links and forms stay inside this practice area.
Mini assignment
Practice assignment
Try it yourself
Self-check
Do not only read this page. Answer these questions out loud or write the answers in your own notes. If one answer feels vague, revisit the examples before moving on.