O'Reilly logo

CSS Pocket Reference, 4th Edition by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Universal Values

Any user agent that has fully implemented the “cascading and inheritance” module will honor the values inherit and initial on all properties. In practice (as of mid-2011), support for inherit is much more widespread than initial.

inherit

Forces the value for the property to be inherited from the element’s parent element, even if the property in question is not inherited (e.g., background-image). Another way to think of this is that the value is copied from the parent element.

initial

Forces the value of the property to be the initial value defined by the relevant CSS module. For example, font-style: initial sets the value of font-style to normal regardless of the font-style value that would have been inherited from the parent element. In cases where the initial value is defined as determined by the user agent, such as font-size, the value is set to the “default” defined by the user agent’s preferences.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required