English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML tag大全

HTML: <hr> size attribute

<hr> size attribute usage method, the size attribute specifies the height of the horizontal line (in pixels), online example demonstrates how to use the <hr> size attribute, browser compatibility, syntax definition, and detailed information about its attribute values.

 HTML <hr> tag

Online Example

height is 10px horizontal line:

<p>Normal height horizontal line:</p>/p>
<hr>
<p>Horizontal line height of hr:</p>10px:</p>
<hr size="10">
Test to see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

The size attribute is not recommended, but all major browsers still support this attribute

Definition and Usage

HTML5 The <hr> size attribute is not supported. Please use CSS instead.

In HTML 4.01 In HTML, 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 In this case, the size attribute of <hr> is deprecated. Please use CSS instead.

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

CSS Example: Setting the height of the <hr> element

In our CSS tutorial, you can find more aboutheight attributedetails.

Syntax

<hr size="pixels">

Attribute Value

ValueDescription
pixelsSpecify the height of the <hr> element.
 HTML <hr> tag