Multiple choice technology web technology

How do you add a background color for all

elements?

  1. h1.all {background-color:#FFFFFF}

  2. h1 {background-color:#FFFFFF}

  3. all.h1 {background-color:#FFFFFF}

  4. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

To style all elements of a specific type in CSS, you use the element selector directly. Therefore, h1 targets all <h1> elements. The other options use class selectors (.all or .h1), which would only target elements with those specific class names rather than all <h1> tags.