HTML Headings
HTML offers six levels of heading: <h1> through <h6>. <h1> is the most important; <h6> is the least.
The heading hierarchy
Why hierarchy matters
- Accessibility: screen readers let users jump between headings to scan a page.
- SEO: search engines weight headings — especially
<h1>— to understand what a page is about. - Maintenance: a clear outline makes long pages much easier to edit.
Note: Pick heading levels for meaning, not size. If you want a smaller heading, use the right level and shrink it with CSS — don't jump from
<h1> straight to <h4> for visual reasons.Tip: Use exactly one
<h1> per page (typically the page title), then nest <h2>–<h6> beneath it.Example
Example
<!DOCTYPE html> <html> <body> <h1>Heading 1</h1> <h2>Heading 2</h2> <h3>Heading 3</h3> <h4>Heading 4</h4> <h5>Heading 5</h5> <h6>Heading 6</h6> </body> </html>Try it Yourself »
Exercise
Use the most important heading level for the page title.
<
>Welcome</
>
It is the highest heading rank.
Discussion
Loading…