The correct HTML code for inserting an image is (a) <img href=”image.gif”>
The correct HTML code for inserting an image is
(a) <img href=”image.gif”>
(b) <img> image.gif</gif>
(c) <img src = “image.gif”>
(d) <image src = “image.gif” >
The correct HTML code for inserting an image is
(a) <img href=”image.gif”>
(b) <img> image.gif</gif>
(c) <img src = “image.gif”>
(d) <image src = “image.gif” >
Best answer
Correct option is (c) <img src=”image.gif “>
Answer: (c) <img src="image.gif">
An image is inserted with the empty <img> tag. Its src (source) attribute gives the path or URL of the image file:
<img src="image.gif" alt="Logo" width="200" height="100">Option (a) is wrong because href is used with the <a> tag for links, not for images. Option (b) puts the file name as content, which is invalid, and option (d) uses <image>, which is not the correct HTML tag.
Practise this chapter
Log in or create a free account to answer this question.