Definition and Usage The align attribute specifies horizontal alignment of the hr (horizontal ruler) element. This attribute does not have...
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" />
Syntax
<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.Example
Source | Output |
---|---|
<hr style="width:50%" align="left" /> | |