0

How to assign link to an image?

<a href="http://www.sololearn.com"> <img src="tree.jpg" /> </a>

17th Jul 2017, 4:43 PM
TRN
4 Respostas
+ 4
<a href="" ><img src="" alt=""></a>
17th Jul 2017, 4:49 PM
visph
visph - avatar
+ 2
You must assign a path/image file name to the src attribute of <img>, else you doesn't have an image to click ^^ (just the text of 'alt'). Anyway, the image need to be hosted on internet to work in playground...
17th Jul 2017, 5:10 PM
visph
visph - avatar
0
It works when you actually put a link/src for the image. Here's a random one on the Internet. <a href="http://www.sololearn.com"> <img src="https://pbs.twimg.com/media/DDIK5LJXYAIusCD.jpg" alt="Image Not Available" /> </a>
17th Jul 2017, 8:46 PM
James
James - avatar