HTML Heading Tags (h1 to h6)

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.

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.

HTML Comment Tag HTML Doctype Tag HTML anchor Tag HTML abbr Tag HTML acronym Tag HTML address Tag HTML applet Tag HTML area Tag HTML article Tag HTML aside Tag HTML audio Tag HTML b Tag HTML base Tag HTML basefont Tag HTML bdi Tag HTML bdo Tag HTML big Tag HTML blockquote Tag HTML body Tag HTML br Tag HTML Button Tag HTML Canvas Tag HTML Caption Tag HTML Center Tag HTML Cite Tag HTML Code Tag HTML Col Tag HTML colgroup Tag HTML data Tag HTML datalist Tag HTML dd Tag HTML del Tag HTML details Tag HTML dfn Tag HTML dialog Tag HTML dir Tag HTML div Tag HTML dl Tag HTML dt Tag HTML em Tag HTML embed Tag HTML fieldset Tag HTML figcaption Tag HTML figure Tag HTML font Tag HTML footer Tag HTML form Tag HTML frame Tag HTML frameset Tag HTML Heading Tags HTML head Tag HTML header Tag HTML hr Tag HTML html Tag