HTML <h1> to <h6> tags

Updated: 05/08/2017 by Computer Hope

HTML h1 to h6 tagsWhen writing in HTML, the <h1> to <h6> tags are block elements used to designate headings of both different sizes and importance. For example, the h1 heading is the most important and the h6, the least important. The following sections contain information about these tags, including an example of them in use, as well as related attributes and browser compatibility.

Example code

<h3>Here is an h3 heading on Computer Hope</h3>

Example result

Here is an h3 heading on Computer Hope

Deprecated attributes

Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair; all tags support standard attributes. Every attribute unique to the <h1 to h6> tags are deprecated, meaning that it may function currently, but is not supported in going forward. In this case, CSS should be used in place of this attribute.

Attribute Description
align Designates the alignment of the content within a heading element

Compatibility

Internet Explorer Firefox Safari Opera Chrome
All versions All versions All version All versions All versions

Browser, Code, Compatibility