What is the correct HTML for adding a background color?

The CSS background-color property can be used to apply a background color to an HTML element. This attribute assigns the given color value to an element's background color.

For instance

body { background-color: #f0f0f0; }/* Enter the appropriate color value */

Go from files to website in seconds.

Start a free trial for 7 days — no credit card required

Get Started for Free