+ 1

Converting an image into a link

how to convert an image into a link for another page in HTML or CSS

12th Mar 2018, 1:51 AM
Arun Sharma
Arun Sharma - avatar
4 odpowiedzi
+ 3
just surround the img tag with an anchor tag like you would for text. <a href="www.site.com"><img src="pic.jpg"></a> https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_link_image
12th Mar 2018, 1:57 AM
ChaoticDawg
ChaoticDawg - avatar
+ 2
well it didn't in sololearn but it did in chrome, thnks
12th Mar 2018, 2:28 AM
Arun Sharma
Arun Sharma - avatar
+ 1
not working
12th Mar 2018, 1:58 AM
Arun Sharma
Arun Sharma - avatar
+ 1
What's not working? Can you make a regular link work? show your code.
12th Mar 2018, 2:01 AM
ChaoticDawg
ChaoticDawg - avatar