CSS: Reset, Default Values

By Xah Lee. Date: . Last updated: .

You can reset CSS values to its default.

all: revert
Set all CSS properties to browser's default.
Supported by all browsers as of 2020-11.
But was not supported by Google Chrome as of 2020-03.
all: initial
Set all CSS properties to CSS's initial value for this property. For each CSS property, the CSS spec defines a initial value. For example, initial value of display is inline, for all HTML elements, including div. Note: this value is NOT useful.
all: inherit
Set all CSS properties to inherit from parent HTML element's CSS value.
all: unset
Set it to inherit if it does inherit, else set it to initial value.

Examples

/* reset all HTML elements to browser default */
* {all: revert}
/* reset div element to browser default */
div {all: revert}
JS in Depth
XAH  BUY NOW

CSS

Basics

Color

Font

Text Decoration

Box Model

Box Decoration

Layout

Layers

Transform/Animation

Line Wrap

Misc