HTML Headings
HTML defines six levels of headings. They are used to create a logical document outline — like a table of contents.
Heading Hierarchy
<h1>— Page title (one per page)<h2>— Major sections<h3>— Subsections within h2<h4>–<h6>— Deeper nesting (rarely needed)
Why Headings Matter
- SEO — Search engines use headings to understand your content
- Accessibility — Screen readers use them to navigate
- Readability — They give visual structure to the page