CodesCompiler
πŸ”
HTMLCSSJavaScriptPythonSQLPHPSEOPostsBooksKids About Contact πŸš€ Get Started Free

CSS - all Property

CSS - all Property

CSS all property resets all properties of an element, with the exception of unicode bidi , direction and CSS custom properties . It can reset properties to their original or inherited values or to the values explicitly defined in another cascade layer or in the stylesheet origin.

Syntax

CSS CODE
all: initial | inherit | unset;

Property Values

ValueDescription
initialIt changes all the properties applied to an element or to its parent to their initial value.
inheritIt changes all the properties applied to an element or to its parent to their parent value.
unsetIt changes all the properties applied to the element or the element’s parent to their parent value if they are inheritable else to their initial value if not

Examples of CSS All Property

The following example explains the all property with different values.

All Property with Initial Value

To let an element’s properties be set to their default values assigned by the browser such that no defined styling is applicable to them, we use the initial value. This is shown in the following example.

Example

Preview

All Property with Inherit Value

To let an element’s properties be set to the properties of the element’s parent or the html element then, we use the inherit value. The properties defined by the parent if present will be applied if not then the html element properties will be applied. This is shown in the following example.

Example

Preview

All Property with Unset Value

To let the properties of an element be obtained from its parent if present or from html element if absent or from the default values decided by the browser (behave like initial) in the absence of both then, we use unset value. This is shown in the following example.

Example

Preview

Supported Browsers

Property
all37.079.027.09.124.0