Easy Tutorial
❮ Tag Meta Av Event Stalled ❯

HTML <hr> size Attribute

HTML <hr> Tag

Example

A horizontal line with a height of 30 pixels:


Browser Support

All major browsers support the size attribute.


Definition and Usage

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 details about the height property.


Syntax

Attribute Values

Value Description
pixels Specifies the height of the <hr> element.

❮ Tag Meta Av Event Stalled ❯