HTML <hr> sizeAttribute

HTML hr 标签参考手册HTML <hr> Tag

Examples

Horizontal line with a height of 30 pixels:

<hr size="30">

Try it yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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 标签参考手册HTML <hr> Tag Other Extensions