Widely availableSupported across all major browsers. Safe to use in production.

Overview

The initial keyword resets any CSS property to its initial value as defined by the specification. For example, the initial value of the display property is inline, regardless of the element being styled. Not to be confused with revert, which resets to the user or browser default style.

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

display: initial

CSS Display: initial demo.

PreviewFullscreen

margin: initial

CSS Margin: initial demo.

PreviewFullscreen

color: initial

CSS Color: initial demo.

PreviewFullscreen

Use cases

  • Using initial

    The initial keyword resets any CSS property to its initial value as defined by the specification. For example, the initial value of the display property is inline, regardless of the element being styled. Not to be confused with revert, which resets to the user or browser default style.

Cautions

  • May not be supported in older browsers.

Accessibility

  • Make sure visual changes are conveyed appropriately to assistive technology.

Powered by web-features