English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
<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.
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 ‹/›
IEFirefoxOperaChromeSafari
The size attribute is not recommended, but all major browsers still support this attribute
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.
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.
<hr size="pixels">
Value | Description |
---|---|
pixels | Specify the height of the <hr> element. |