Interactive online courses HTML Academy
2026-03-09 12:56 Diff

The background color can be set using the background-color CSS property.

Recall that colors in CSS can be specified in different formats: in hexadecimal (or HEX), RGB, or RGBA as well as using such color constants such as red or green.

You can find out more about colors on the page HTML Colors.

Here is an example of how the property is used:

selector { background-color: #ff0000; }