Complete the code to set the background color of the body to lightblue.
body {
background-color: [1];
}The background-color property sets the background color of an element. Here, lightblue is the correct color value.
Complete the code to set the background color of a div with class 'box' to #ffcc00.
.box {
background-color: [1];
}The hex color #ffcc00 is a shade of yellow. It is the correct value to set the background color as requested.
Fix the error in the code to correctly set the background color of the header to rgb(255, 0, 0).
header {
background-color: [1];
}The correct syntax for rgb color uses commas between the numbers inside parentheses: rgb(255, 0, 0).
Fill both blanks to set the background color of paragraphs to a semi-transparent black using rgba.
p {
background-color: [1]([2], 0.5);
}The rgba function sets colors with red, green, blue, and alpha (transparency). Here, 0, 0, 0 is black, and 0.5 is 50% transparency.
Fill all three blanks to set the background color of a section to a linear gradient from red to blue.
section {
background: linear-gradient([1], [2], [3]);
}The linear-gradient function creates a smooth transition between colors. Here, it goes to right from red to blue.