To hyperlink an image in HTML, you should use the <img> tag inside the <a> tag. For example :
<a href="https://example.com"> <img src="https://app.3schools.in/logo.png" height="50" width="50"> </a>
As you know the <a> tag is used to create a link. Anything used inside an anchor element behaves like a link. So, we put the image element inside the anchor element to turn the image into a link.
Comments (0)