CSS bootcamp · Lab 49

CSS variable color

mediumVariables12 minLesson: Variables

Read the question, write CSS on the right, then Preview or Check.

QuestionHint and solution stay closed until you open them

:root --brand #0d9488; #title color var(--brand).

Examples

Example 1
Expected
var(--brand)
Hint
  1. Define on :root then use var().
Show correct code

Peek only after you have tried. You can still Check your own version.

:root {
  --brand: #0d9488;
}
#title {
  color: var(--brand);
}
styles.cssLive preview · Check reads computed styles
ResultIdle
Run to see output. Check grades the tests.