CSS All Property

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

CSS all Property

Example

Change all the properties applied to the element or the element's parent to their initial value:

div {
    background-color: yellow;
    color: red;
    all: initial;

}

Definition and Usage

The all property resets all properties, apart from unicode-bidi and direction, to their initial or inherited value.

CSS Syntax

all: initial|inherit|unset;

Property Values

Value Description
initial Changes all the properties applied to the element or the element's parent to their initial value
inherit Changes all the properties applied to the element or the element's parent to their parent value
unset Changes all the properties applied to the element or the element's parent to their parent value if they are inheritable or to their initial value if not