Setting background color in CSS

You already know how to change the text color. Now let's learn how to change the background color. This is done using the background-color property, which takes the same values ​​as the well-known color.

Let's fill the block with an orange background (and make the text color white):

html<div id="elem">
  Lorem ipsum dolor sit amet.
</div>
css#elem {
  width: 300px;
  height: 100px;
  color: white;
  background-color: orange; /* set the background color to orange */
}

Результат:

Задание 1

Repeat the page according to this example:

Задание 2

Repeat the page according to this example: