You are here: Reference > JavaScript > client-side > HTML DOM > properties > noShade (hr)

noShade property (hr)

Browser support:
Specifies or returns whether the horizontal rule should be displayed as flat instead of three dimensional.
Use style properties to manipulate line styling more efficiently. (background, color, height ...)

Syntax:

object.noShade;
You can find the related objects in the Supported by objects section below.
This property is read/write.
HTML page for this property: NOSHADE

Possible values:

Boolean that indicates whether the rule is drawn with three dimensional shade.
One of the following values:
false
Default. Rule is drawn with shade.
true
Rule is drawn without shade.
Default: false.

Example HTML code 1:

This example illustrates the use of the noShade attribute:
<hr noshade="noshade" size="5" style="width:50%; text-align:center;" />
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the noShade property:
<head>
    <script type="text/javascript">
        function ToggleShade (buttonElem) {
            var rule = document.getElementById ("myRule");

            buttonElem.innerHTML = (rule.noShade) ? "With shade" : "Without shade";
            rule.noShade = !rule.noShade;
        }
    </script>
</head>
<body>
    <hr id="myRule" noshade="noshade" size="5" style="width:50%; text-align:center;" />
    <button onclick="ToggleShade (this);">Without shade!</button>
</body>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content