css.properties

background-color

The background-color property sets the background color of an element.

Formal Syntax

background-color = <color> <color> = <color-base> | currentColor | <system-color> | <contrast-color()> | <device-cmyk()> | <light-dark()>

See specification

JavaScript Access

// Access via element.style element.style.backgroundColor = "transparent";

Browser Support

standard | MDN · Spec

FeatureChromeFirefoxSafariEdge
background-color11112
currentColor≤31≤50≤9.1≤15
transparent11112

Related Properties