text

<h1>

The top-level heading, describing the main topic of the page or its sectioning root. Modern practice allows one <h1> per page (the page title) or one per sectioning element — pick a convention and stick to it.

<h1>Page title</h1>

Common attributes

Attribute Purpose
id Anchor target for deep links
class Styling hook
lang Language override for the heading

Examples

<h1>Learn HTML tags</h1>

Primary page heading

<h1 id="top">Docs</h1>

Heading you can link to with #top

<article><h1>Post title</h1></article>

Heading scoped to an article (valid in HTML5)

Gotcha

Never skip heading levels for visual sizing — style with CSS instead so the outline stays intact for screen readers and SEO. Only one

per page is the safest and most SEO-friendly choice.

Related tags

← All HTML tags · CSS selectors · HTML entities