LESSON 14 OF 100

Return to the initial value

Reset a child colour with the initial value.

Official sourceW3C CSS Cascade — initial keywordReviewed: 2026-08-26
STEP 1 · LEARN

How it works

The initial value asks a property for its specification-defined initial value, even when the property would normally inherit.

Correct example
.reset { color: initial; }

The .reset text no longer takes the container colour.

Common mistake
.reset { color: inherit; }

inherit does the opposite: it keeps the parent colour.

STEP 2 · APPLY

Your exercise

Complete the .reset rule with the initial value.

STEP 3 · BUILD

Write and see the result

index.htmlCSS
Safe resultisolated
The draft stays only in this browser.HTML and CSS allowed · scripts and network blocked
STEP 4 · CHECK

What needs to pass

0%not checked
  • The container keeps the theme colour.
  • .reset uses the initial value.
Explain the solution logic

initial stops inheritance for that declaration and asks for the property’s initial value.