horizontal alignment of a heading


<hn align="">

Browser
Internet Explorer Firefox Opera
Type
Block-level Deprecated

The align attribute of the Hn element specifies the horizontal text alignment of a heading.


<h1 align="center">heading</h1>


Attribute Value Explanation
align=" " left aligns to the left
center aligns to the center
right aligns to the right

The use of this attribute is deprecated. (Use CSS instead)

Tips and Notes

Use CSS instead of deprecated HTML. Please see the "Related Document" for details on CSS.


Example

<h1 align="left">Aligns to the left</h1>
<h2 align="center">Aligns to the center</h2>
<h3 align="right">Aligns to the right</h3>
Output

Aligns to the left

Aligns to the center

Aligns to the right