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
<p>
Represents a paragraph — a block of running text separated from its neighbors. Use it for prose; do not use it as a generic wrapper for other block-level content.
<article>
Self-contained content that could be distributed independently — a blog post, news story, forum reply, or product card. Use it when the content would make sense syndicated or on its own page.
<section>
A thematic grouping of content that typically has a heading and belongs in a document outline. Use it when the content is a distinct chunk of a larger whole; use <article> instead if it stands alone.
<a>
The anchor element creates a hyperlink to another page, a file, an in-page anchor, an email, or a phone number. It is the fundamental building block of the web's link graph and a key SEO signal.