CSS Variables & Custom Properties

CSS Variables allow you to store reusable values like colors and sizes.

Example: Boxes using CSS Variables

Box 1
Box 2

Resize your browser to see the boxes adjust!

Quiz: Test Your Knowledge

1. How do you declare a CSS variable?




2. Where should global variables be defined?




3. How do you use a variable in CSS?