0

This may sound stupid but I am having troubles adding a link to the following code:

<span class="image fit"><img src="images/pic.png" alt="pic" /></span>

How could I add a link to this?

Melissa
  • 3
  • 2
  • 1
    Possible duplicate of [How can I create download link in HTML?](https://stackoverflow.com/questions/2793751/how-can-i-create-download-link-in-html) – Andrea Carraro Nov 12 '17 at 16:09

3 Answers3

0

Adding a link in html be like :

<a href="where you go when you click">the text or img </a>
Brodalee
  • 1
  • 2
0

Do it like this:

<span class="image fit"><a href="http://www.mylink.com/"><img src="images/pic.png" alt="pic" /></a></span>

Zeronull
  • 261
  • 3
  • 5
0

Try following snippet.

<!-- going to google, after clicking -->
<a href="https://www.google.com">
    <span class="image fit"><img src="images/pic.png" alt="pic" /></span>
</a>
Ratul Sharker
  • 7,484
  • 4
  • 35
  • 44