CSS initial keyword

example

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

div {
  color: red;
}
h1 {
  color: initial;
}

try it yourself

definition and usage

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

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

version: CSS3
JavaScript syntax: object.property="initial"

browser support

表格中的数字注明了完全支持该属性的首个浏览器版本。

keyword Chrome IE Firefox Safari Opera
initial 1.0 12.0 19.0 1.2 15.0

CSS ਗਰੰਥ

property: initial;

ਸਬੰਧਤ ਪੰਨੇ

CSS inherit ਕੀਵਾਰਡ:inherit ਕੀਵਾਰਡ