HTML headings are titles or subtitles that you want to display on a webpage. They help users understand the structure of a page and make the content easy to read.
<h1> to <h6>
HTML headings are used to define the titles and section headings of a webpage.
The heading tags range from <h1> to <h6>.
<h1> is the largest and most important heading, while <h6> is the smallest and least important.
<h1> defines the most important heading.
<h6> defines the least important heading.
Headings are used for structure, readability, and design. They help people and search engines understand the topic of each section.
Search engines use headings to understand the content of a webpage. Users also skim pages by reading headings first. That is why headings should be used properly and in order.
<h1> for the main title of the page, then use <h2>, <h3>, and so on for subheadings.
Each heading level shows different importance in the document hierarchy.
| Tag | Use |
|---|---|
<h1> |
Main title of the page |
<h2> |
Major section heading |
<h3> |
Subsection heading |
<h4> |
Smaller subsection heading |
<h5> |
Lower level heading |
<h6> |
Smallest heading |
<h1>This is the main heading</h1>
<h2>This is a subheading</h2>
<h3>This is a smaller heading</h3>
<h1> should be used only once per page.<h2> to <h6> can be used multiple times as needed.Headings provide a clear visual beginning of each section or topic. They improve readability, help users find information quickly, and make the webpage look organized.
Which heading tag is the most important?