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.
Tests
- Waiting: 1. Your
div
element should have the classsilver-background
. - Waiting: 2. Your
div
element should have a silver background. - Waiting: 3. A class named
silver-background
should be defined within thestyle
element and the value ofsilver
should be assigned to thebackground-color
property.
/** * Your test output will go here */