HTMLHRElement
The HTMLHRElement interface provides special properties (beyond those of the HTMLElement interface it also has available to it by inheritance) for manipulating <hr> elements.
Properties
Inherits properties from its parent, HTMLElement.
-
HTMLHRElement.align -
Is a
DOMString, an enumerated attribute indicating alignment of the rule with respect to the surrounding context. -
HTMLHRElement.color -
Is a
DOMStringrepresenting the name of the color of the rule. -
HTMLHRElement.noshade -
Is a boolean value that sets the rule to have no shading.
-
HTMLHRElement.size -
Is a
DOMStringrepresenting the height of the rule. -
HTMLHRElement.width -
Is a
DOMStringrepresenting the width of the rule on the page.
Methods
No specific method; inherits methods from its parent, HTMLElement.
Specifications
| Specification |
|---|
| HTML Standard (HTML) # htmlhrelement |
Browser compatibility
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
HTMLHRElement |
1 |
12 |
1 |
5.5 |
≤12.1 |
1 |
1 |
18 |
4 |
≤12.1 |
1 |
1.0 |
align |
1 |
12 |
1 |
6 |
≤12.1 |
1 |
1 |
18 |
4 |
≤12.1 |
1 |
1.0 |
color |
33 |
12 |
1 |
6 |
20 |
10.1 |
4.4.3 |
33 |
4 |
20 |
10.3 |
2.0 |
noShade |
1 |
12 |
1 |
5.5 |
≤12.1 |
1 |
1 |
18 |
4 |
≤12.1 |
1 |
1.0 |
size |
1 |
12 |
1 |
6 |
≤12.1 |
1 |
1 |
18 |
4 |
≤12.1 |
1 |
1.0 |
width |
1 |
12 |
1 |
6 |
≤12.1 |
1 |
1 |
18 |
4 |
≤12.1 |
1 |
1.0 |
See also
- The HTML element implementing this interface:
<hr>
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLHRElement