Computerhelp4all logo Articles AboutTopicsQuizzesComputer Questions & AnswersComputer Terms & DefinitionsActivitiesContact

What Is A HTML Heading Tag?

What Is A HTML Heading Tag

Date First Published: 3rd October 2022

Topic: Web Design & Development

Subtopic: Web Development

Article Type: Computer Terms & Definitions

Difficulty: Medium

Difficulty Level: 5/10

Learn more about what a HTML heading tag is in this article.

Not to be confused with the HTML head tag.

A HTML heading tag can be defined as a HTML element that displays a title or subheading on a webpage. When placing text within a HTML heading tag, such as <h1>Header</h1>, it will make the text bold and increase the size. The size depends on which header tag is used. There are a total of six levels of headings that are defined within the <h1> to <h6> range, with <h1> being the largest (most important) and <h6> being the smallest (least important). Header tags are useful for showing the structure of a page as some users skim a webpage by its headings to find what they are looking for. All web browsers support heading tags and automatically add some whitespace before and after each heading.

Note: Info Icon

HTML header tags should only be used for structural purposes. They should not be used to make text big or bold.

Note: Info Icon

Avoid using more than one <h1> tag. Ideally, the largest header tag should only be used for the main title. Multiple <h1> headings create a meaningless and disorganised structure as it suggests that all the headings of the webpage are the main headings.

How To Customise The Size Of HTML Headings?

Every HTML heading has a default size. However, the size can be customised using CSS. In the example below, a specific <h1> tag has a font size of 55px.

<h1 style="font-size:55px;">Customised H1 Heading Size</h1>

If you want to apply the font size to all headings, add the CSS property below with the relevant heading tag number in place:

h1 { font-size: 55px; }

SEO

The use of heading tags is good for SEO. They help search engines, such as Google to understand and index the structure of a piece of content. Putting text into a header tag suggests that the text is important and search engines use this to determine the context of a page, helping them to display results relevant to the searcher’s queries. These headings can appear in search engines, listing the structure of a webpage and also helping searchers to understand what the page is about. The main keyword (e.g. the title of the page) should appear in the <h1> tag.


Feedback

  • Is there anything that you disagree with on this page?
  • Are there any spelling, grammatical, or punctuation errors on this page?
  • Are there any broken links or design errors on this page?

If so, it is important that you tell me as soon as possible on this page.