Multiple choice technology web technology

What is the correct HTML for inserting a background image?

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

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

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

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

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

In traditional HTML, background images were set using the background attribute on the body tag. While modern practices use CSS, option C shows the correct HTML attribute syntax. Options A and B use non-existent attributes or tags, and option D places background as a standalone attribute without the body tag.