Multiple choice technology web technology

What is the correct HTML for adding a background color?

  1. <background>yellow</background>

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

  3. <body background="yellow">

  4. None

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

Background color in HTML should be set using CSS within the style attribute. is correct inline CSS syntax. The tag doesn't exist in HTML. The background attribute is deprecated.