CSS initial Keyword


Example

Set the text color of the <div> element to red, but keep the initial color for <h1> elements:

div {
  color: red;
}

h1 {
  color: initial;
}
Try it Yourself »

Definition and Usage

The initial keyword is used to set a CSS property to its default value.

The initial keyword can be used for any CSS property, and on any HTML element.

Version: CSS3
JavaScript syntax: object.style.property="initial" Try it

Browser Support

The numbers in the table specifies the first browser version that fully supports the initial keyword.

Keyword
initial 1.0 12.0 19.0 1.2 15.0

CSS Syntax

property: initial;

Related Pages

CSS inherit Keyword: inherit keyword


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.