HTML hr align Attribute

Definition and Usage

The align attribute specifies horizontal alignment of the hr (horizontal ruler) element.
This attribute does not have any effect unless the width is less than 100%.

Compatibility Notes

The align attribute of the hr element was deprecated in HTML 4.01 and is not supported in XHTML 1.0 Strict DTD.
Use CSS instead.
CSS syntax for IE and Opera: <hr style="text-align:right" />
CSS syntax for Firefox: <hr style="margin-right:0" />
For cross-browser syntax use both: <hr style="text-align:right;margin-right:0" />


<hr align="alignment" />

Syntax Example

<hr align="left" />

Attribute Values

Value Description
center Default. Center-align the horizontal ruler.
left Left-align the horizontal ruler.
right Right-align the horizontal ruler.

Browser Support

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


Source Output
<hr style="width:50%" align="left" />

HTML hr align Attribute Reviewed by 1000sourcecodes on 03:04 Rating: 5
Powered by Blogger.