Latest

recent

HTML h1, h2, h3, h4, h5 and h6 tags align property

Definition and Usage

The align attribute specifies horizontal alignment of the header element.

Compatibility Notes

The align attribute of the  h1 to h6 elements was deprecated in HTML 4.01 and is not supported in XHTML 1.0 Strict DTD.
Use CSS instead.
CSS syntax: <h1 style="text-align:right">


Syntax

<h1 align="alignment">

Syntax Example

<h1 align="right">

Attribute Values

Value Description
left Left-align text.
right Right-align text.
center Center-align text.
justify  Justify text within left and right margins.


Browser Support

The attribute is deprecated, but still supported in all major browsers.

Example

Source Output
<h3 align="right">Hello world</h3>

Hello world

HTML h1, h2, h3, h4, h5 and h6 tags align property Reviewed by 1000sourcecodes on 03:12 Rating: 5
Powered by Blogger.