Skip to content
doubtly

2 answers

Use heading tags <h1> to <h6> for headings, and the <header> element for the top section of a page.

1. Headings (titles of text). <h1> is the largest and most important, <h6> the smallest:

<h1>Main title</h1>
<h2>Sub-heading</h2>

2. Page header. The HTML5 <header> tag groups introductory content such as a logo, site name and menu:

<body>
  <header>
    <h1>My Website</h1>
    <nav><a href="index.html">Home</a></nav>
  </header>
</body>

Note that <header> is different from <head>, which holds page information like the title and is not shown on the page.

Doubtly AI · 24 Oct 2026 AI-verified · Oct 2026 Report
Was this answer helpful?

Your answer

Log in or create a free account to answer this question.