HTML Headings

In this tutorial, you'll learn how to create headings in HTML.

Heading tags are used to create a heading or title on a web page. Heading tags are very important for an HTML document.

The heading is written in the HTML document with the tag <h1> ….. <h6>. A total of 6 heading tags from <h1> to <h6> carry significance, the <h1> tag is the most important and the largest, and the <h6> tag is the least important and the smallest.

Follow  the heading tag in html with the example:

Code Example:
<!DOCTYPE html>
<html lang="en">
    <title>HTML Headings</title>								
    <h1>Heading level 1</h1>
    <h2>Heading level 2</h2>
    <h3>Heading level 3</h3>
    <h4>Heading level 4</h4>
    <h5>Heading level 5</h5>
    <h6>Heading level 6</h6>

The output of the above explain all the heading tags in html

Heading level 1

Heading level 2

Heading level 3

Heading level 4

Heading level 5
Heading level 6
Note : The browser automatically leaves some space above and below a heading, that is, it adds margins.

Importance of Headings

Heading tags are very important for search engines. Search engines use titles or headings to index the structure and content of websites..

Use heading tags only for headings. Not for making text bold or for paragraphs. The h1 heading should be used as the main heading, then the h2 heading, then the h3 heading, and so on up to h6.