Latest web development tutorials

HTML hr size property

HTML hr tag Reference Manual HTML <hr> tag

Examples

A height of 30 pixels in the horizontal line:

<hr size="30">

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the size attribute.


Definition and Usage

HTML5 does not support the <hr> size attributes. Use CSS instead.

In HTML 4.01, <hr> The size attribute obsolete .

size attribute specifies the height of the horizontal line, in pixels.


Compatibility Notes

In HTML 4.01, <hr> The size attribute is deprecated. Use CSS instead.

CSS Syntax: <hr style = "height: 30px">

Height setting <hr> element: CSS Examples

In our CSS tutorial you can find more information about the height property detail.


grammar

<hr size="pixels">

Property Value

描述
pixels 规定 <hr> 元素的高度。


HTML hr tag Reference Manual HTML <hr> tag