HTML Heading :
- 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.
- HTML supports 6 types of headings.
- These are the headings defined in HTML – <h1>,<h2>,<h3>,<h4>,<h5>,<h6>
- <h1> type of heading is having more importance than any other type of heading.
- <h6> heading is having least importance.
- 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.
<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>
Example #2 : Heading with HR
<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>
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
<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>
Head tag is a container for meta data. Meta data are not displayed in the browser window
HTML Heading Tips :
- HTML heading should not be used in web document for just making text bold.
- Headings are having the some importance in the Search Engine.
- Most important part of the webpage should be titled with H1 heading and Sub Point should have H2 type heading