<hn align="">
Browser |
|
---|---|
Type |
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)
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