HTML Heading

In this HTML tutorial, you will learn all about Heading in HTML. We will also discuss the most commonly used Heading Tags in HTML.

What is meant by heading tags in HTML?

A title or subtitle that you wish to display on the web page may be defined as an HTML header or HTML h tag. When you add text enclosed within the heading tags <h1>...</h1>, it is shown in bold on the browser, and the size of the text depends on the number of headings.

The <h1> to <h6> elements establish six separate HTML headings, from the highest level h1 (primary heading) to the lowest level h6 (least important heading). Browsers show heads in a bigger and bolder font than normal text by convention.

The greatest heading tag is h1, and the lowest is h6. As a result, h1 is used for the most significant heading while h6 is used for the least important.

What is the importance of the heading tags in HTML?

  1. HTML headers provide vital information by identifying important subjects and the structure of the page; therefore, they help to properly optimize the webpage to increase user engagement.
  2. Use headers to make your content appear BIG or BOLD but we shouldn't do so.  Use them simply to emphasize the title of your document and to display the structure of the text.
  3. Because search engines like Google utilize headers to index the structure and content of web pages, use them sparingly on your website.
  4. Use the <h1> headings as your web page's major headers, followed by the <h2> headings, then the less important <h3> headings, and so on.

Heading tags in HTML


<!DOCTYPE html>
<html>
<body>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
</body>
</html>

HTML Headings