Coding task · HTML and CSS course · Module 11: Developer Tools

CSS variables in the root selector

CSS variables (Custom Properties) are defined in :root using --name: value; and used with var(--name). They make it easier to manage colors and values across the entire stylesheet.

Task

Define CSS variables in :root and use them instead of hardcoded values in styles.