CSS initial Keyword


Example

Set the text-color inside a <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 Not supported 19.0 1.2 15.0


CSS Syntax

property: initial;


Related Pages

CSS inherit Keyword: inherit keyword



Color Picker

colorpicker