How can I make an image a link to another page?
Asked on Sep 22, 2025
Answer
To make an image a link to another page, you can wrap the image element inside an anchor tag. This allows the image to function as a clickable link.
<!-- BEGIN COPY / PASTE -->
<a href="https://www.example.com">
<img src="image.jpg" alt="Description of Image">
</a>
<!-- END COPY / PASTE -->Additional Comment:
- The
<a>tag is used to create hyperlinks, with thehrefattribute specifying the destination URL. - The
<img>tag is used to embed images, with thesrcattribute pointing to the image file. - Always include an
altattribute in the<img>tag to describe the image for accessibility purposes.
✅ Answered with HTML best practices.
Recommended Links: