HTML Dog
Skip to navigation

CSS Value: initial

Property reset keyword. A property’s initial value, removing any values that are normally inherited.

Example


body { font-size: 0.8em }
p { color: red }
strong {
    font-size: initial;
    color: initial;
}
/* strong elements, even those inside paragraphs, will remain black and normal sized. */
/* The body's font-size and p's color will not be inherited by strong, as they normally would */

Browser support

Can I Use css-initial-value? Data on support for the css-initial-value feature across the major browsers from caniuse.com.