Set the text-color for <span> elements to blue, except those inside elements with class="extra":
span {
color: blue;
}
.extra span {
color: inherit;
}
The inherit
keyword specifies that a property should inherit its value from its parent element.
The inherit
keyword can be used for any CSS property, and on any HTML element.
The numbers in the table specifies the first browser version that fully supports the inherit keyword.
Keyword inherit 1.0 8.0 1.0 1.0 4.0 CSS Syntax Related PagesCSS initial Keyword: initial keyword
Track your progress - it's free!
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4