HTML Questions & Answers Logo
HTML Questions & Answers Part of the Q&A Network
Q&A Logo

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 the href attribute specifying the destination URL.
  • The <img> tag is used to embed images, with the src attribute pointing to the image file.
  • Always include an alt attribute in the <img> tag to describe the image for accessibility purposes.

✅ Answered with HTML best practices.


← Back to All Questions
The Q&A Network