initial

initial CSS 키워드는 속성의 초기값(initial value)을 요소에 적용합니다. 모든 CSS 속성에 허용되고 요소가 속성의 초기값을 사용하도록 합니다.

참고: 상속되는 속성에, 초기값은 놀라울 수도 있고 대신에 inherit, unset 또는 revert 키워드 사용을 고려하여야 합니다.

예제

 

HTML

<p>
  <span>This text is red.</span>
  <em>This text is in the initial color (typically black).</em>
  <span>This is red again.</span>
</p>

CSS

p {
  color: red;
}

em {
  color: initial;
}

 

명세

명세 상태 설명
CSS Cascading and Inheritance Level 4
The definition of 'initial' in that specification.
Candidate Recommendation Level 3에서 변화 없음.
CSS Cascading and Inheritance Level 3
The definition of 'initial' in that specification.
Candidate Recommendation 초기 정의.

브라우저 호환성

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
initialChrome Full support 1Edge Full support 13Firefox Full support 19
Full support 19
No support 1 — 24
Prefixed
Prefixed Implemented with the vendor prefix: -moz-
IE No support NoOpera Full support 15Safari Full support 1.2WebView Android Full support 1Chrome Android Full support 18Firefox Android Full support 19
Full support 19
No support 4 — 24
Prefixed
Prefixed Implemented with the vendor prefix: -moz-
Opera Android Full support YesSafari iOS Full support 1Samsung Internet Android Full support Yes

Legend

Full support  
Full support
No support  
No support
Requires a vendor prefix or different name for use.
Requires a vendor prefix or different name for use.

참조