HTML <h1> to <h6> tags

Updated: 11/13/2018 by Computer Hope
HTML h1 to h6 tags

When 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 of header 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.


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

Browser, Code, Compatibility, Web design terms