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

<h1 id="title">

The <title> element is the recommended way to set a spec title, but when you need markup in the title (e.g., for internationalization or code formatting), use a single <h1 id="title"> element in the body.

Usage

<body>
  <h1 id="title">The <code>Widget</code> Interface</h1>
  <section id="abstract">
    <p>This spec defines the Widget interface.</p>
  </section>
</body>

Notes

  • ReSpec warns if the <title> element text and the <h1 id="title"> text content don't match — keep them in sync
  • Only one <h1 id="title"> is allowed
  • The <title> element is still required for the HTML document — the <h1> overrides the rendered title only

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