div {
background-color: #ff6347;
width: 100px;
height: 100px;
}The hex code #ff6347 corresponds to a tomato color, which is a shade of orange-red. It is not pure red or blue or green.
body {
background-color: rgb(0, 128, 0);
margin: 0;
height: 100vh;
}The background-color is set to rgb(0, 128, 0), which is a medium green. The height: 100vh makes the body fill the full viewport height, and margin: 0 removes default spacing, so the green fills the entire window.
<p> tags inside <section> elements. Which selector does this correctly?The selector section p targets all <p> elements inside any <section>. Option D selects only direct children, which is more restrictive but still valid. However, option D is the general correct selector for paragraphs inside sections.
Pure black and pure white create very high contrast which can cause eye strain for many users. Accessibility guidelines recommend softer contrasts for better readability and comfort.
The background-color has 50% transparency (alpha 0.5). The opacity: 0.5 applies to the entire element, making it 50% transparent as well. These transparencies multiply, so the visible background is even more faint red.