CSS var() Function (original) (raw)
Last Updated : 30 Aug, 2024
The var() function in CSS is used to insert a value for a custom property.
**Syntax:
var( custom_property, value )
**Parameters: This function accepts two parameters which are listed below:
- **custom_property: It is the required parameter. The name of the custom property must start with two dashes(–).
- **value: It is an optional parameter. It is used if the custom property is invalid.
**Example: The below program illustrates the var() function in CSS:
html `
var() function