Give a Background Color to a Div Element


You can set an element's background color with the background-color property.

For example, if you wanted an element's background color to be green, you'd put this within your style element:

.green-background {
  background-color: green;
}

Create a class called silver-background with the background-color of silver. Assign this class to your div element.

Get a hint