CKTIS / HTML
section — thematic section
The `section` element groups content around a shared topic, typically with a heading. It is not a generic styling container.
Version: WHATWG HTML Living Standard; index snapshot date recorded separately
Syntax
<section>
<h2>Heading</h2>
<p>Related content.</p>
</section>section represents a section of a document or application: a thematic grouping of content, typically with a heading. Use it for a part that deserves an entry in the document outline.
When you only need a container for CSS or scripting, choose div. For self-contained content suitable for independent distribution, consider article.
section belongs to flow content, sectioning content, and palpable content; it accepts flow content. It supports global attributes. Both tags are required. Match heading levels to the hierarchy: the example uses h2 for a subsection following h1.
Examples
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Study guide</title>
</head>
<body>
<h1>Study guide</h1>
<section>
<h2>Preparation</h2>
<p>Read the introduction.</p>
</section>
</body>
</html>Result
Study guide Preparation Read the introduction.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.