← Quiz: CSS Variables and Animations: all 10 questions
Quiz: CSS Variables and Animations · Question 2 of 10
What does color: var(--accent, orange); do if --accent is not defined?
What does color: var(--accent, orange); do if --accent is not defined?
- A.The rule is ignored completely
- B.It uses orange as the fallback
- C.It uses black
- D.It throws an error in the console
Answer & explanation
Correct answer: It uses orange as the fallback
The second argument to var() is a fallback value.
Can you get the rest right without peeking?
Take the timed Quiz: CSS Variables and Animations quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →