8.8.4 Background Colors Answers |verified| -

window.onload = function() document.getElementById("mainBody").style.backgroundColor = "lightblue"; ;

| Property | Description | Example | |----------|-------------|---------| | background-color | Sets background color of an element | background-color: blue; | | Color values | Named colors, HEX, RGB, HSL, RGBA | #ff0000 , rgb(255,0,0) , rgba(0,0,255,0.5) | | body selector | Applies background to whole page | body background-color: lightgray; | | Specific elements | Can target div , p , h1 , etc. | h1 background-color: yellow; | 8.8.4 background colors answers

To set the entire page's background to a specific color, apply the style to the "background-color: blue;" Use code with caution. Copied to clipboard Applying Color to Specific Elements window

Alternatively:

: You can highlight specific headings or paragraphs by adding style directly to those tags. RGBA | #ff0000