By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

CSS Background-color Property

Reference on how to use the background property of CSS.

Edited: 2015-02-21 14:59

The css background-color property obviously sets the background-color of a given element.

Possible Values

To understand the many different values for color, Consult the Reference entry on Colors

Background-color example

This example sets the background for the body element, I.E. The intire site.

body {
  background-color: red;

Inherited? - NO!