HTML <hr> sizeAttribute
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the size attribute.
Definition and Usage
HTML5 does not support the <hr> size attribute. Use CSS instead.
In HTML 4.01, the size attribute of <hr>is deprecated。
The size attribute specifies the height of the horizontal line, in pixels.
Compatibility Notes
In HTML 4.01, the size attribute of <hr> is deprecated. Use CSS instead.
CSS syntax: <hr style="height:30px">
CSS example: Set the height of the <hr> element
In our CSS tutorial, you can find more aboutthe height propertydetails.
Syntax
<hr size="pixels">
Attribute Values
| Value | Description |
|---|---|
| pixels | Specifies the height of the <hr> element. |
HTML <hr> Tag Other Extensions