initial
The initial CSS keyword applies the initial (or default) value of a property to an element. It can be applied to any CSS property, including the CSS shorthand property all. With all set to initial, all CSS properties can be restored to their respective initial values in one go instead of restoring each one separately.
On inherited properties, the initial value may be unexpected. You should consider using the inherit, unset, revert, revert-layer, or revert-rule keywords instead.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 1 | 13 | 19 | 1.2 | 18 | 1 | |
1+Supported (version) Not supported ※Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)
Notes 2 item(s)
Removed
- This feature was removed in a later browser version (24)
Compatibility
- Available with a vendor prefix: -moz- (1)
Syntax
CSS
.reset {
display: initial; /* inline */
margin: initial; /* 0 */
color: initial; /* canvastext */
} Live demo
Use cases
-
Using initial
The initial CSS keyword applies the initial (or default) value of a property to an element.
Cautions
- May not be supported in older browsers.
Accessibility
- Make sure visual changes are conveyed appropriately to assistive technology.