--- title: all slug: Web/CSS/all translation_of: Web/CSS/all ---
{{CSSRef}}

The all CSS shorthand property sets all of an element's properties (other than {{cssxref("unicode-bidi")}} and {{cssxref("direction")}}) to their initial or inherited values, or to the values specified in another stylesheet origin..

/* Global values */
all: initial;
all: inherit;
all: unset;

/* CSS Cascading and Inheritance Level 4 */
all: revert;

{{cssinfo}}

Syntax

The all property is specified as one of the CSS global keyword values. Note that none of these values affect the {{cssxref("unicode-bidi")}} and {{cssxref("direction")}} properties.

Values

{{cssxref("initial")}}
Specifies that all the element's properties should be changed to their initial values.
{{cssxref("inherit")}}
Specifies that all the element's properties should be changed to their inherited values.
{{cssxref("unset")}}
Specifies that all the element's properties should be changed to their inherited values if they inherit by default, or to their initial values if not.
{{cssxref("revert")}}
Specifies behavior that depends on the stylesheet origin to which the declaration belongs:
User-agent origin
Equivalent to unset.
User origin
Rolls back the cascade to the user-agent level, so that the specified values are calculated as if no author-level or user-level rules were specified for the element.
Author origin
Rolls back the cascade to the user level, so that the specified values are calculated as if no author-level rules were specified for the element. For purposes of revert, the Author origin includes the Override and Animation origins.

Formal syntax

{{csssyntax}}

Examples

HTML

<blockquote id="quote">
  Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</blockquote>
Phasellus eget velit sagittis.

CSS

body {
  font-size: small;
  background-color: #F0F0F0;
  color: blue;
}

blockquote {
  background-color: skyblue;
  color: red;
}

Result

No all property

{{EmbedLiveSample("ex0", "200", "125")}}

The {{HTMLElement("blockquote")}} uses the browser's default styling together with a specific background and text color. It also behaves as a block element: the text that follows it is beneath it.

all:unset

{{EmbedLiveSample("ex1", "200", "125")}}

The {{HTMLElement("blockquote")}} doesn't use the browser default styling: it is an inline element now (initial value), its {{cssxref("background-color")}} is transparent (initial value), but its {{cssxref("font-size")}} is still small (inherited value) and its {{cssxref("color")}} is blue (inherited value).

all:initial

{{EmbedLiveSample("ex2", "200", "125")}}

The {{HTMLElement("blockquote")}} doesn't use the browser default styling: it is an inline element now (initial value), its {{cssxref("background-color")}} is transparent (initial value), its {{cssxref("font-size")}} is normal (initial value) and its {{cssxref("color")}} is black (initial value).

all:inherit

{{EmbedLiveSample("ex3", "200", "125")}}

The {{HTMLElement("blockquote")}} doesn't use the browser default styling: it is a block element now (inherited value from its containing {{HTMLElement("body")}} element), its {{cssxref("background-color")}} is #F0F0F0 (inherited value), its {{cssxref("font-size")}} is small (inherited value) and its {{cssxref("color")}} is blue (inherited value).

Specifications

Specification Status Comment
{{ SpecName('CSS4 Cascade', '#all-shorthand', 'all') }} {{ Spec2('CSS4 Cascade') }} Added the revert value.
{{ SpecName('CSS3 Cascade', '#all-shorthand', 'all') }} {{ Spec2('CSS3 Cascade') }} Initial definition.

Browser compatibility

{{Compat("css.properties.all")}}

See also

CSS global keyword values: {{cssxref("initial")}}, {{cssxref("inherit")}}, {{cssxref("unset")}}, {{cssxref("revert")}}