CSS background-color Property

The CSS background-color property is used to set the background color of an element. The background of an element is the total size of the element, including padding and border, excluding the margin.

CSS background-color Example

body {background-color: khaki;}

Set background color with a HEX value

body {background-color: #FFDAB9;}

Set background color with an RGB value

body {background-color: rgb(255,218,185);}