Computer Science, asked by ravenclaw7421, 9 months ago

Can you turn an image into a hyperlink? Explain with an example.

Answers

Answered by samirafrid
17

Answer:

Bascially, the image is displayed with the img tag. To display an image with this tag, it would be in this format:

<img src="[your link to the image goes here]" />

The img tag only display an image - it cannot link to anything. In order to make the image link to something, the img tag needs to be wrapped by the a tag. A link is made in this format:

<a href="[your link here]">[content]</a>

Now put it all together by wrapping the img with a link (a):

<a href="[your link here]"><img src="[your link to the image goes here]" /></a>

Answered by Mrigakshi432
6

Answer:

yes we can turn a image into a hyperlink. For this dimply place the image source, using the <img> tag, between <a> and </a> tags.

For example:

<a href = "myschool.html"> <img src = "school. gif"></a>

Similar questions