Question:easy

Which attribute of the <img> tag is used to specify the path of the image to be displayed?

Show Hint

Think of the full form of src. Which word means where the image comes from?
Updated On: Nov 3, 2026
  • href
  • src
  • link
  • source
Show Solution

The Correct Option is B

Solution and Explanation

Step 1: Recall how an image is written:
A picture in HTML is written as <img src="file" alt="text">. Here src carries the file location and alt carries the backup text.

Step 2: Match the options with where they are really used:
href: used in links. link: used in the body tag for link colour. source: not an HTML attribute. src: used in <img>, <audio> and <video>.

Step 3: Decide:
Only src is meant for the image path, so option B is correct.

Step 4: Why the other three are not the answer:
The word href belongs to links, where it holds the place the link goes to. The word link is used in the body tag to set a colour. The word source is not an HTML attribute at all. Only the short word src is accepted by the image tag.

Final Answer:
The image path goes in src, so the answer is option B. \[ \boxed{\text{B. src}} \]
Was this answer helpful?
0