Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-cascade/initial-color-background-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Cascade: the "initial" value</title>
<link rel="match" href="initial-color-background-001-ref.html">
<meta name="assert" content="initial is not the same as inherit. color:initial results in non-red. background-color:initial results in transparent.">
<style>
body {
background-color: white;
}
div {
font-size: 100px;
}
.outer {
color: red;
}
.inner {
background-color: red;
}
.inner {
color: initial;/* normally black, almost certainly not red */
background-color: initial;/* transparent, so the body's white will show thru */
}
</style>
</head>
<body>
<p>Test passes if there is a "W" and <strong>no red</strong>.</p>
<div class="outer">
<div class="inner">W</div>
</div>
</body>
</html>