HTML noshade Attribute
The obsolete HTML noshade attribute was historically used on the <hr> element to request a solid horizontal rule instead of the shaded or three-dimensional appearance commonly produced by older browsers.
noshade attribute is obsolete and should not be used in modern HTML. Use CSS border and background properties to control the appearance of a horizontal rule.
Historical Syntax
The noshade attribute was a Boolean attribute placed on an <hr> element:
<hr noshade>
Its presence requested that supporting browsers display the horizontal rule as a solid line rather than using a shaded appearance.
Historical Elements
The obsolete noshade attribute was associated with the <hr> element.
| Element | Historical Purpose |
|---|---|
<hr> |
Requested a solid horizontal rule instead of the browser's shaded or three-dimensional presentation. |
Historical Use
Older browsers commonly displayed horizontal rules with a beveled or shaded appearance. Authors could add noshade when they wanted a flatter, solid-looking rule.
<p>First section of content.</p>
<hr noshade>
<p>Second section of content.</p>
The attribute affected presentation rather than the meaning of the <hr> element. Other historical attributes could also be used to control characteristics such as its width, size, alignment, and color.
Why It Became Obsolete
The noshade attribute controlled visual presentation directly through HTML. Modern HTML separates document structure and meaning from presentation, with CSS providing the styling.
CSS gives authors much more control over a horizontal rule, including its color, thickness, border style, width, and spacing. A separate HTML attribute for removing the old shaded appearance is therefore unnecessary.
Modern Alternative
Use CSS to control the appearance of the <hr> element. Removing the browser's default border and adding a background color provides a simple solid horizontal rule.
Historical HTML
<hr noshade>
Modern HTML
<hr class="solid-rule">
Modern CSS
.solid-rule {
border: 0;
height: 3px;
background-color: #0088cc;
}
The CSS removes the default border, sets the height of the rule, and gives it a solid background color. The appearance can be changed without adding presentational attributes to the HTML.
Play in EditorLearn More About CSS
The CSS tutorials explain the properties that can be used to style horizontal rules and other elements:
- CSS Borders - Learn how CSS controls border width, style, and color.
- CSS Background Color - Learn how to apply a background color to an element.
Legacy Browser Support
The noshade attribute was widely recognized by older browsers as a presentational option for the <hr> element.
Modern webpages should not rely on the attribute, even if a browser continues to recognize it for compatibility with older content. Use CSS to control the visual appearance of horizontal rules.
For additional information about historical browser compatibility, visit Can I Use? . Search for the HTML element or attribute you want to check. Search results can include related HTML features, element attributes, APIs, and other technologies, so select the result that most closely matches the legacy feature you are researching.
Related Attributes
Other obsolete presentational attributes historically associated with horizontal rules include:
align- Historically controlled the horizontal alignment of elements including<hr>.color- Was supported by some browsers for setting the color of a horizontal rule.
Historical <hr> markup also used presentational attributes such as size and width. Modern webpages should use CSS for these visual characteristics.
Specifications
The noshade attribute on the <hr> element is obsolete and must not be used by authors. CSS should be used to control the presentation of horizontal rules. See the WHATWG HTML Living Standard for information about obsolete and non-conforming features.
