HTML <hr>
noshade
Attribute
Example
Horizontal line with shading effect (this is the default):
<p>Horizontal line without shading effect:</p>
<hr noshade>
Browser Support
All major browsers support the noshade
attribute.
Definition and Usage
In HTML 4.01, the noshade
attribute of <hr>
is deprecated.
The noshade
attribute is a boolean attribute.
The noshade
attribute specifies that the color of the horizontal line should be 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 Shading Effect
In our CSS tutorial, you can find more details about the color and background-color properties.
Differences Between HTML and XHTML
In XHTML, attribute minimization is forbidden, and the noshade
attribute must be defined as <hr noshade="noshade" />
.