Multiple choice technology web 2.0

What is the correct HTML for inserting an image?

  1. <img display="image.gif" />

  2. <img image="image.gif" />

  3. <img src="image.gif" />

  4. <img ="image.gif" />

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

HTML images use the self-closing tag with a 'src' attribute pointing to the image file path: . 'display', 'image', and bare '=' are not valid image attributes.

AI explanation

The correct HTML for embedding an image uses the src (source) attribute: <img src="image.gif">. src tells the browser where to fetch the image file from — it's the only attribute the <img> element recognizes for the image location. 'display', 'image', and a bare = are not valid HTML attributes on <img>, so none of those would load an image; they'd simply be ignored or cause invalid markup.