Multiple choice technology web technology

What is the correct HTML for inserting a background image?

  1. <background img="background.gif">

  2. <img src="background.gif" background />

  3. <body background="background.gif">

  4. < background="background.gif" body>

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

The correct HTML syntax for a background image is ``. The background attribute goes in the body tag. Options A and B use incorrect tag/attribute combinations, and D has malformed syntax with swapped attribute and tag name.