To use a CSS variable, the syntax is var(________, optionalDefaultValue).
- --variable-name
- $variable-name
- #variable-name
- @variable-name
In CSS, the correct syntax for using a variable is var(--variable-name, optionalDefaultValue). The double hyphen -- is used to declare a variable, and it is accessed using the var() function.
Loading...
Related Quiz
- With PostCSS, developers can write plugins to create custom ________ for their projects.
- In CSS Grid, which property defines the number of columns in the grid layout?
- What is the difference between position: absolute; and position: fixed; in terms of the reference point for positioning?
- How do vendor prefixes affect the CSS properties in browsers that do not support them?
- What is the main purpose of media queries in CSS?