HTML Heading



HTML Heading :

  1. If we want to make the some part of the text appears to be under some heading then we can use the heading tags in HTML.
  2. HTML supports 6 types of headings.
  3. These are the headings defined in HTML – <h1>,<h2>,<h3>,<h4>,<h5>,<h6>
  4. <h1> type of heading is having more importance than any other type of heading.
  5. <h6> heading is having least importance.
  6. Browser adds some empty space (margin) before each heading

HTML Heading Example

Example #1 : Simple heading

below example of HTML heading will illustrate the headings in HTML.

Example :

<h1>This is H1 Heading</h1>
<h2>This is H2 Heading</h2>
<h3>This is H3 Heading</h3>
<h4>This is H4 Heading</h4>
<h5>This is H5 Heading</h5>
<h6>This is H6 Heading</h6>

Edit Yourself »

Example #2 : Heading with HR

Example :

<h1>This is H1 Heading</h1>
<hr />
<h2>This is H2 Heading</h2>
<hr />
<h3>This is H3 Heading</h3>
<hr />
<h4>This is H4 Heading</h4>
<hr />
<h5>This is H5 Heading</h5>
<hr />
<h6>This is H6 Heading</h6>

Edit Yourself »

Example #3 : Heading vs Head

There are chances of confusion while interpreting head and heading tags. But important thing is that both tags are completely different

Example :

<head>
<title>This is Head tag</title>
</head>

<body>
<h1>This is Heading tag not head tag</h1>
<h2>This is Heading tag not head tag</h2>
<h3>This is Heading tag not head tag</h3>
</body>

Edit Yourself »

Head tag is a container for meta data. Meta data are not displayed in the browser window

HTML Heading Tips :

  1. HTML heading should not be used in web document for just making text bold.
  2. Headings are having the some importance in the Search Engine.
  3. Most important part of the webpage should be titled with H1 heading and Sub Point should have H2 type heading