Layout Options

  • Fixed Header
    Makes the header top fixed, always visible!
  • Fixed Sidebar
    Makes the sidebar left fixed, always visible!
Basics Html Heading
Navigation menus are one of the basic building blocks for any web or mobile app.

Tag Description

The h1 element is used to define an HTML heading.

The <h1> tag defines the largest heading and the <h6> tag defines the smallest heading.

This tag has the form:

<h1>
  heading text
</h1>

HTML5 and HTML4.01 Differences

The "align" attribute was deprecated in HTML4.01, and is not supported in HTML5.

Attributes

Attribute Value Description
align left
right
center
justify
Specifies the alignment of a heading
HTML4: Deprecated in HTML4.01
HTML5: Not supported in HTML5

Global Attributes

This tag also supports the HTML Global Attributes.

Event Attributes

This tag also supports the HTML Event Attributes.

Examples

The following example shows the basic use of this tag:

<h1>Heading Text</h1>
<p>Paragraph text</p>

Browser Support

Firefox IE Chrome Opera Safari

Doctype Declaration Support

The following table lists the doctype declarations this element may appear in:

HTML4.01 / XHTML1.0 XHTML 1.1 HTML 5
Traditional Strict Frameset

Miscellaneous Information

Defined In: HTML 3.2
Empty Tag: No

Tag Description

The h2 element is used to define an HTML heading.

The <h1> tag defines the largest heading and the <h6> tag defines the smallest heading.

This tag has the form:

<h2>
  heading text
</h2>

HTML5 and HTML4.01 Differences

The "align" attribute was deprecated in HTML4.01, and is not supported in HTML5.

Attributes

Attribute Value Description
align left
right
center
justify
Specifies the alignment of a heading
HTML4: Deprecated in HTML4.01
HTML5: Not supported in HTML5

Global Attributes

This tag also supports the HTML Global Attributes.

Event Attributes

This tag also supports the HTML Event Attributes.

Examples

The following example shows the basic use of this tag:

<h2>Heading Text</h2>
<p>Paragraph text</p>

Browser Support

Firefox IE Chrome Opera Safari

Doctype Declaration Support

The following table lists the doctype declarations this element may appear in:

HTML4.01 / XHTML1.0 XHTML 1.1 HTML 5
Traditional Strict Frameset

Miscellaneous Information

Defined In: HTML 3.2
Empty Tag: No

Tag Description

The h3 element is used to define an HTML heading.

The <h1> tag defines the largest heading and the <h6> tag defines the smallest heading.

This tag has the form:

<h3>
  heading text
</h3>

HTML5 and HTML4.01 Differences

The "align" attribute was deprecated in HTML4.01, and is not supported in HTML5.

Attributes

Attribute Value Description
align left
right
center
justify
Specifies the alignment of a heading
HTML4: Deprecated in HTML4.01
HTML5: Not supported in HTML5

Global Attributes

This tag also supports the HTML Global Attributes.

Event Attributes

This tag also supports the HTML Event Attributes.

Examples

The following example shows the basic use of this tag:

<h3>Heading Text</h3>
<p>Paragraph text</p>

Browser Support

Firefox IE Chrome Opera Safari

Doctype Declaration Support

The following table lists the doctype declarations this element may appear in:

HTML4.01 / XHTML1.0 XHTML 1.1 HTML 5
Traditional Strict Frameset

Miscellaneous Information

Defined In: HTML 3.2
Empty Tag: No

Tag Description

The h4 element is used to define an HTML heading.

The <h1> tag defines the largest heading and the <h6> tag defines the smallest heading.

This tag has the form:

<h4>
  heading text
</h4>

HTML5 and HTML4.01 Differences

The "align" attribute was deprecated in HTML4.01, and is not supported in HTML5.

Attributes

Attribute Value Description
align left
right
center
justify
Specifies the alignment of a heading
HTML4: Deprecated in HTML4.01
HTML5: Not supported in HTML5

Global Attributes

This tag also supports the HTML Global Attributes.

Event Attributes

This tag also supports the HTML Event Attributes.

Examples

The following example shows the basic use of this tag:

<h4>Heading Text</h4>
<p>Paragraph text</p>

Browser Support

Firefox IE Chrome Opera Safari

Doctype Declaration Support

The following table lists the doctype declarations this element may appear in:

HTML4.01 / XHTML1.0 XHTML 1.1 HTML 5
Traditional Strict Frameset

Miscellaneous Information

Defined In: HTML 3.2
Empty Tag: No

Tag Description

The h5 element is used to define an HTML heading.

The <h1> tag defines the largest heading and the <h6> tag defines the smallest heading.

This tag has the form:

<h5>
  heading text
</h5>

HTML5 and HTML4.01 Differences

The "align" attribute was deprecated in HTML4.01, and is not supported in HTML5.

Attributes

Attribute Value Description
align left
right
center
justify
Specifies the alignment of a heading
HTML4: Deprecated in HTML4.01
HTML5: Not supported in HTML5

Global Attributes

This tag also supports the HTML Global Attributes.

Event Attributes

This tag also supports the HTML Event Attributes.

Examples

The following example shows the basic use of this tag:

<h5>Heading Text</h5>
<p>Paragraph text</p>

Browser Support

Firefox IE Chrome Opera Safari

Doctype Declaration Support

The following table lists the doctype declarations this element may appear in:

HTML4.01 / XHTML1.0 XHTML 1.1 HTML 5
Traditional Strict Frameset

Miscellaneous Information

Defined In: HTML 3.2
Empty Tag: No

Tag Description

The h6 element is used to define an HTML heading.

The <h1> tag defines the largest heading and the <h6> tag defines the smallest heading.

This tag has the form:

<h6>
  heading text
</h6>

HTML5 and HTML4.01 Differences

The "align" attribute was deprecated in HTML4.01, and is not supported in HTML5.

Attributes

Attribute Value Description
align left
right
center
justify
Specifies the alignment of a heading
HTML4: Deprecated in HTML4.01
HTML5: Not supported in HTML5

Global Attributes

This tag also supports the HTML Global Attributes.

Event Attributes

This tag also supports the HTML Event Attributes.

Examples

The following example shows the basic use of this tag:

<h6>Heading Text</h6>
<p>Paragraph text</p>

Browser Support

Firefox IE Chrome Opera Safari

Doctype Declaration Support

The following table lists the doctype declarations this element may appear in:

HTML4.01 / XHTML1.0 XHTML 1.1 HTML 5
Traditional Strict Frameset

Miscellaneous Information

Defined In: HTML 3.2
Empty Tag: No