Easy Tutorial
❮ Css3 Pr Column Fill Pr Grid Column Start ❯

CSS inherit Keyword

CSS Reference Manual

Example

Set the text color of <span> elements to blue, except those with class="extra":

span
{
    color: blue;
}

.extra span
{
    color: inherit;
}

Browser Support

The numbers in the table specify the first browser version that fully supports the property.

Property
inherit 1.0 8.0 1.0 1.0 4.0

Definition and Usage

The inherit keyword specifies that a property should inherit its value from its parent element.

The inherit keyword can be used on any CSS property for any HTML element.

Version: CSS3
JavaScript Syntax: object.style.property="inherit" Try it
--- ---

CSS Syntax


Related Articles

CSS initial Keyword: initial Keyword

CSS Reference Manual

❮ Css3 Pr Column Fill Pr Grid Column Start ❯