Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Cascade: the "initial" value</title>
<link rel="author" title="Chris Rebert" href="http://chrisrebert.com">
<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>