113k views
4 votes
How do you add a background color for all elements?

User Gulay
by
8.1k points

1 Answer

4 votes

Answer:

To add background color in HTML, use the CSS background-color property

Step-by-step explanation:

Set it to the color name or code you want and place it inside a style attribute. Then add this style attribute to an HTML element, like a table, heading, div, or span tag.

User Pavan Mallela
by
8.2k points

No related questions found