Definition and Usage The width attribute specifies width of the hr (horizontal ruler) element. Compatibility Notes The width attribute of ...
Definition and Usage
The width attribute specifies width of the hr (horizontal ruler) element.
Compatibility Notes
The width 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: <hr style="width:10px" />
Syntax
Syntax Example
Attribute Values
Value | Description |
pixels | Length in pixels (like "100px", or just "100"). |
percent | Length in percent of the available space (like "20%"). |
Browser Support
The attribute is deprecated, but still supported in all major browsers.
Example
Source | Output |
<hr width="50%" /> |
|