Defining a main heading and sub-headings in HTML is done with the help of heading tags <h1> to <h6>. An <h1> tag is the most visible tag. As the tag number increases, the size of the actual header is smaller.
Why use heading tags?
The heading tags form an outline for the page’s content. These are HTML tags that specify headers of different sizes on the web page. The H1 tag, the largest heading on the page, is the main heading of the page, so there will usually be only one such heading tag on the landing page.
A user who enters the landing page and reads the title, should understand from the title the main topic of the landing page, and basically understand that he has reached the right place for his needs.
For example on this page. The H1 title is “h1–h6: Heading Tag” – which is the main topic this page talks about.
What are the reasons for using h1-h6 tags?
Improving the readability of the landing page
Headings h1-h6 are tags that are displayed in the HTML code, and when the browser reads them, it knows that they should be displayed prominently within the page frame. This prominent display improves the readability of the content on the page, since it allows the user to locate the specific content that interests him on the page.
Improving the accessibility of the landing page
Headings h1-h6 help to improve the accessibility of the page content for users with disabilities who use a screen reader. The screen reader knows how to read the content according to the definition of the titles and the text embedded in the code, and read them to the user. By defining the headings in the text, the screen reader can allow the user to move between these headings.
Creation of a neat and organized content structure on the landing page
Defining a main title and sub-titles in long content pages allows the user to read the content in an orderly and organized manner. Many people skim and scroll through the content on the Internet, and the sub-titles help them understand the essence of the text that appears after the title.
Long content written in one mass without subheadings and without effective content construction for the user, can cause the user to leave the landing page or have difficulty understanding the written text.
The contribution to promote the landing page
The heading tags are important for the optimization of the landing page. The bots of the different search engines check the titles on the landing page, check if there is a promoted phrase in these titles in order to better understand the essence of the text. Headline and subheadings that correspond to the queries of the surfers in the search engines are an influential factor in the ranking of the landing page in these engines.
Footnote: We often see references from Googlers to the Headings tags on websites and especially to the H1 tag. John Mueller, a Google employee, explained many times that it is not necessary to use the h1 tag on the landing page in order for the Google bot to understand the essence of the text on the page. Still, this does not mean that there is no need to present a main heading or sub-headings as part of the user experience and as a factor for the bot to rank the page.
Important note! Confusion between the H1 tag and the Title tag
Many people get confused between these two tags. The similarity between the H1 tag and the Title tag is that both tags describe the main content on the landing page.
The essential difference between the two is that the H1 tag appears on the landing page and is displayed as the main title of the landing page. While the Title tag appears on the Google search results page and in the title tab at the top of the browser window of the landing page.
More information can be read in Google’s guide to optimization