HTML <hr> size Attribute (original) (raw)
Last Updated : 11 Jul, 2025
The **HTML
element's size attribute defines the height (thickness) of the horizontal rule. It accepts numerical values that specify the pixel height. However, this attribute is deprecated in HTML5, and it's recommended to use CSS for controlling the height of
elements.
**Syntax
**Attribute Values
It contains single value **pixels which specify the height in terms of pixels.
**Note: The
size Attribute is not supported by HTML 5.
**Example: In this example we centers a heading "GeeksforGeeks" and uses two
elements, where the size attribute adjusts their thickness to 10 and 20 pixels, creating visually distinct horizontal lines.
html `
HTML hr size AttributeGeeksforGeeks
Computer science portal
`
**Output:

**Supported Browsers
The browser supported by **HTML
size Attribute are listed below: