Skip to content
Marcos Caceres edited this page Mar 27, 2026 · 7 revisions

<section>

Standard HTML <section> elements are the building blocks of a ReSpec specification. ReSpec handles heading numbering, ToC generation, ID creation, and self-links automatically.

Usage

<section>
  <h2>The <code>fetch()</code> method</h2>
  <p>The <code>fetch()</code> method initiates a network request.</p>
</section>
<section>
  <h2>Infrastructure</h2>
  <section>
    <h2>Concepts</h2>
    <p>This section defines key concepts.</p>
  </section>
  <section>
    <h2>Algorithms</h2>
  </section>
</section>

Empty link auto-fill

Links to a section's ID with no text content are automatically filled with "§ N.N Title":

<p>See <a href="#infrastructure"></a> for details.</p>
<!-- Renders as: See § 2 Infrastructure for details. -->

Notes

  • Use <h2> for all top-level sections by convention (ReSpec renumbers them correctly regardless)
  • Nesting depth can go beyond <h6> — ReSpec clamps to <h6> for deep nesting
  • Add id attributes manually for stable URLs; ReSpec generates IDs from heading text if absent
  • Special section IDs: abstract, sotd, conformance, toc — these trigger specific boilerplate
  • See appendix for lettered appendix sections
  • See informative to mark a section as non-normative

Guides

Configuration options

W3C Configuration options

Linting rules

Internal properties

Handled by ReSpec for you.

Special <section> IDs

HTML elements

Custom Elements

HTML attributes

CSS Classes

Special properties

Clone this wiki locally