HTML <hr> noshadeAttribute

HTML hr 标签参考手册HTML <hr> Tag

Examples

Horizontal line with shadow effect (this is the default):

<p>Horizontal line without shadow effect:</p>
<hr noshade>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the noshade attribute.


Definition and Usage

HTML5 does not support the <hr> noshade attribute. Use CSS instead.

In HTML 4.01, the noshade attribute of <hr>is deprecated。

The noshade attribute is a boolean attribute.

The noshade attribute specifies that the horizontal line is rendered as a solid color, rather than a shaded color.


Compatibility Notes

In HTML 4.01, the noshade attribute of <hr> is deprecated. Use CSS instead.

CSS syntax (Internet Explorer): <hr style="height:2px;color:gray">

CSS syntax (Firefox, Opera, Chrome, and Safari): <hr style="height:2px;border-width:0;background-color:gray">

CSS syntax (cross-browser): <hr style="height:2px;border-width:0;color:gray;background-color:gray">

CSS Example: <hr> without shadow effect

In our CSS tutorial, you can find more information aboutcolorandbackground-colorthe details of the attribute.


Differences Between HTML and XHTML

In XHTML, attribute minimization is forbidden, and the noshade attribute must be defined as <hr noshade="noshade" />.


Syntax

<hr noshade>


HTML hr 标签参考手册HTML <hr> Tag Other Extensions