h1
The main page subject. Use one clear h1 for most pages.
Learn h1 to h6 as part of the HTML element system: when to use it, how it fits inside a document and what mistakes to avoid.
Headings
Heading elements h1 through h6 are structure, not decoration. They tell readers what the next part of the document is about.
Good headings make a page scannable. If you read only the headings, you should still understand the flow of the content.
h1 to h6. The readable outline of the page. Syntax in context
Start with the main subject, then divide the page into sections and subsections.
<h1>Learn HTML</h1> <h2>HTML basics</h2> <h3>Elements</h3> <h3>Attributes</h3> <h2>HTML layout</h2>
Good versus weak
<h1>Learn HTML</h1> <h2>HTML basics</h2> <h3>Elements</h3> <h3>Attributes</h3> <h2>HTML layout</h2>
<h1>Learn HTML</h1> <h4>HTML basics</h4> <h2>Elements</h2> <h6>Attributes</h6>
Rules that matter
Move from h1 to h2 to h3 in a logical order.
Use CSS to style size. Use HTML to describe structure.
A heading should explain the next content block.
SEO headings should be natural and useful.
Production thinking
Headings matter because many people do not read a page from top to bottom. They scan. Search engines scan. Screen reader users can jump from heading to heading. A clean outline makes the page usable faster.
Screen reader users often jump by headings. A strong outline becomes a navigation system.
Headings are one of the easiest places to improve SEO and usability without adding design complexity.
Live code lab
Edit the HTML or CSS, then use Run to refresh the preview. The preview is isolated, so links and forms stay inside this practice area.
Mini assignment
Practice assignment
Try it yourself
Self-check
Do not only read this page. Answer these questions out loud or write the answers in your own notes. If one answer feels vague, revisit the examples before moving on.