English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

HTML: <hr> noshade attribute

The noshade attribute is a boolean attribute. The noshade attribute specifies that the horizontal line should be displayed in a solid color (without shadow) instead of a shadow color.

 HTML <hr> tag

Online example

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

<p>A shaded horizontal line (this is the default):</p>
<hr>
<p>A noshaded horizontal line:</p>
<hr noshade>
Test to see ‹/›

Browser compatibility

IEFirefoxOperaChromeSafari

The noshade attribute is not recommended for use, but all mainstream browsers support this attribute.

Definition and usage

HTML5 The noshade attribute of <hr> is not supported. Please use CSS instead.

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

The noshade attribute is a boolean attribute.
The noshade attribute specifies that the horizontal line should be displayed in a solid color (without shadow) instead of a shadow color.

Compatibility comments

In HTML 4.01 In it, the noshade attribute of <hr> has been deprecated. Please 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

You can find more aboutcolor and background-color Details of attributes.

Differences between HTML and XHTML

In XHTML, attribute shorthand is prohibited, the noshade attribute must be defined as <hr noshade="noshade" />.

Syntax

<hr noshade>
 HTML <hr> tag