![]()
The align attribute is supported in all major browsers.
The <h1> to <h6> align attribute is not supported in HTML5. Use CSS instead.
The align attribute of <h1> to <h6> is deprecated in HTML 4.01.
The align attribute specifies the horizontal alignment of a heading.
The align attribute of <h1> to <h6> is deprecated in HTML 4.01. Use CSS instead.
CSS syntax: <h1 style="text-align:right">
CSS Example: Set the alignment of headings
In our CSS tutorial you can find more details about the text-align property.
| Value | Description |
|---|---|
| left | Left-aligns the heading |
| right | Right-aligns the heading |
| center | Center-aligns the heading |
| justify | The heading is justified to both margins |
HTML <h1 to h6> tag
Your message has been sent to W3Schools.