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) rather than a shadow color.

 HTML <hr> etichetta

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, but all major browsers support this attribute.

Definition and usage

HTML5 does not support the noshade attribute of <hr>. Please use CSS instead.

In HTML 4.01, the noshade attribute of <hr> has been 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) rather than a shadow color.

Compatibility notes

In HTML 4.01, the noshade attribute of <hr> has been deprecated. Please use CSS instead.

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

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

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

CSS Esempio: <hr> senza ombra

Nella nostra guida CSS, puoi trovare ulteriori informazioni sucolor e background-color Dettagli degli attributi.

Differenze tra HTML e XHTML

In XHTML, la abbreviazione degli attributi è proibita, l'attributo noshade deve essere definito come <hr noshade="noshade" />.

Sintassi

<hr noshade>
 HTML <hr> etichetta