concept

specified-value — CSS reference

After cascade and defaulting, the specified value is established for a property. CSS-wide keywords are interpreted in this process. If no declaration wins, an inherited property takes its inherited value; a non-inherited property takes its initial value. Inheritance uses the parent’s computed value.

Formal Syntax & Structure

css syntaxcss
color: inherit;

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS reference lab</title><style>#parent {color:#006050;opacity:.5} #a {color:inherit} #b {color:initial}</style><body><div id="parent"><div id="a">Sample</div><div id="b">Comparison</div></div></body></html>
CSS Reference