HTML: section
The <section> element groups content that shares a theme, usually with its own heading.
What you will learn
- How to group a page into meaningful topics
- How section differs from article and div
- Why a heading helps make a section clear
Minimal example
<section>
<h2>Shipping information</h2>
<p>Orders leave our warehouse on weekdays.</p>
</section>Use <section> for a thematic part of a page. Use <article> when the content is an independent item, and use <div> when no semantic grouping applies.
Common mistakes
- Do not choose
<section>only to create spacing or a border. - Give the section a heading when it represents a topic readers need to identify.