ScanSkill

background-color

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

Syntax

background-color: color | transparent;

Example

.mydiv{
	background-color: red;
}

.div2{
	background-color: #aaa;
	}

.div3{
	background-color: rgb(3, 189, 44);}
background-color
background-color

Property Values

color: sets the background color to specified value/color.

transparent: sets the background color to transparent. This is the default value.