Multiple choice technology web technology

What is the correct HTML for adding a background color?

  1. <body style="background-color:yellow">

  2. <background>yellow</background>

  3. <body background="yellow">

  4. <body backcolor=”yellow“>

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

Inline CSS is the modern way to set a background color, using `. The other forms are deprecated (background` attribute) or nonsensical tags, making the stored answer the correct one.