Question:

Which HTML tag is used to insert an image?

Show Hint

Always include the `alt` attribute in your `<img>` tags. It is crucial for web accessibility and also helps with search engine optimization (SEO). A correct tag would be `<img src="logo.jpg" alt="Company Logo">`.
Updated On: Jul 2, 2026
  • <img url="htmllogo.jpg" />
  • <img alt="htmllogo.jpg" />
  • <img src="htmllogo.jpg" />
  • <img link="htmllogo.jpg" />
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

In HTML, the `<img>` tag is used to embed an image in a web page. The `<img>` tag is an empty tag, meaning it does not have a closing tag.
It requires several attributes to function correctly, the most important of which is `src`.
`src` (source): This attribute is mandatory and specifies the path or URL to the image file. `alt` (alternative text): This attribute provides a text description of the image. It is important for accessibility (screen readers) and is displayed if the image fails to load.
Let's analyze the options:
(A) `url`: Incorrect attribute. The correct attribute for the image path is `src`. (B) `alt`: This is a valid and important attribute, but it specifies the alternative text, not the image source. The `src` attribute is missing, so this tag would not display an image. (C) `src`: This is the correct attribute to specify the source of the image file. This is the correct syntax. (D) `link`: Incorrect attribute. The `link` tag is different from the `img` tag.
Therefore, `<img src="htmllogo.jpg" />` is the correct tag.
Was this answer helpful?
0
0