Website Spec
← Foundations
Required

The <title> element

Every HTML document must have exactly one non-empty <title> element inside <head>. It is used by browsers, search engines, screen readers, social previews, and AI agents.

What it is

The <title> element is a required child of <head> that names the document. It is the only HTML element with no markup inside it — only text. There must be exactly one per page.

<title>Setting up CSP · The Website Specification</title>

Why it matters

Missing or empty titles are a WCAG 2.4.2 Level A failure — the lowest accessibility bar there is.

How to implement

Write the title for the page, not for the site:

The order matters when the tab is narrow:

<!-- Good: unique part first -->
<title>HSTS · Security · The Website Specification</title>

<!-- Worse: site name eats the tab -->
<title>The Website Specification — Security — HSTS</title>

For the homepage, the site name on its own is fine:

<title>The Website Specification</title>

Common mistakes

Verification

Sources