| hr | NN 6 IE 4 DOM 1 | ||||
|
The hr object reflects the hr element. |
|||||
| HTML Equivalent | |||||
<hr> |
|||||
| Object Model Reference | |||||
[window.]document.getElementById("elementID")
|
|||||
| Object-Specific Properties | |||||
|
|||||
| Object-Specific Methods | |||||
None. |
|||||
| Object-Specific Event Handler Properties | |||||
None. |
|||||
| align | NN 6 IE 4 DOM 1 |
| Read/Write | |
|
Defines the horizontal alignment of the element within its surrounding container. |
|
| Example | |
document.getElementById("myHR").align = "center";
|
|
| Value | |
Any of the three horizontal alignment constant strings: center | left | right. |
|
| Default | |
center |
|
| color | NN n/a IE 4 DOM n/a |
| Read/Write | |
|
Sets the color scheme of the horizontal rule. If the rule is rendered in 3-D, complementary colors are automatically assigned to the shaded area. |
|
| Example | |
document.getElementById("myHR").color = "red";
|
|
| Value | |
Case-insensitive hexadecimal triplet or plain-language color name as a string. See Appendix A for acceptable plain-language color names. |
|
| Default | |
Browser default. |
|
| noShade | NN 6 IE 4 DOM 1 |
| Read/Write | |
|
Indicates whether the browser should render the rule as a flat (not 3-D) line. In Internet Explorer only, if you set the color property, the browser changes the default line style to a no-shade style. In IE, once noShade is set to true, shading cannot later be restored. |
|
| Example | |
document.getElementById("bar2").noShade = "true";
|
|
| Value | |
Boolean value: true | false. |
|
| Default | |
false |
|
| size | NN 6 IE 4 DOM 1 |
| Read/Write | |
|
Provides the thickness in pixels of the horizontal rule. |
|
| Example | |
document.getElementById("rule2").size = 3;
|
|
| Value | |
Positive integer. |
|
| Default | |
2 |
|
| width | NN 6 IE 4 DOM 1 |
| Read/Write | |
|
Provides the width of the rule either in pixels (as an integer) or a percentage (as a string) of the next outermost block-level container. |
|
| Example | |
document.getElementById("bar3").width = "70%";
|
|
| Value | |
Integer (for pixels) or string (for pixels or percentage). |
|
| Default | |
100% |
|