CSS BACKGROUND-COLOR

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

Inherited: No

Examples
1
2
3
p {
  background-color: #ff0000
}
1
2
3
h1 {
  background-color: rgb(0,255,255)
}
1
2
3
body {
  background-color: yellow;
}

Possible Values

color: The color value can be a color name (red), a rgb value (rgb(255,0,0)), or a hex number (#ff0000)
transparent: The background color is transparent.