HTML Heading Tags (h1 to h6) are used to define the headings or main highlighted text of the web page. There are 6 different levels of headings, from h1 to h6.
Table of Contents
Syntax of HTML Heading Tags
The Syntax of all 6 HTML Heading Tags is shown below, they have both starting and ending tags.
<h1> </h1>
<h2> </h2>
<h3> </h3>
<h4> </h4>
<h5> </h5>
<h6> </h6>
Usage of HTML Heading Tags
HTML Heading Tags are used to define the headings inside the web page. Headings are the most important part of Document.
Out of all 6 headings h1 is the most important heading while h6 is the least important heading.
h1 heading tag defines the most important heading and should only be used once. After h1 heading, one can use other levels of headings as well.
All 6 HTML Heading Tags are block level elements.
Example of HTML Heading Tags
Simple example of HTML Heading Tags is shown below.
<h1>Main Heading</h1>
<h2>Second Level Heading</h2>
<h3>Third Level Heading</h3>
<h4>Fourth Level Heading</h4>
<h5>Fifth Level Heading</h5>
<h6>Sixth Level Heading</h6>
Browser Support for HTML Heading Tags
All 6 HTML Heading Tags are supported by all major browsers including Safari and Internet Explorer.
Global Attributes Support in HTML Heading Tags
All 6 HTML Heading Tags support Global Attributes.
Event Attributes Support in HTML Heading Tags
All 6 HTML Heading Tags support Event Attributes.
HTML Heading Tags Video
Watch our video on HTML Heading Tags.
Post a Comment