×

html · level 1 · unit 3 · lesson 4

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

Put an <img> inside an <a> to make a picture link.

Anything inside an <a> becomes clickable, even a picture. Nest the <img> between the opening and closing <a> tags, and the whole picture turns into a link.

Good says where the link goes. Words like click here tell people nothing, especially screen reader users, who often jump from link to link.

In a picture link, the alt text becomes the link text. So describe where it goes, like alt="See all our dogs".

<a href="https://example.com/dogs">
  <img src="dog.svg" alt="See all our dogs">
</a>

Press show my page to see it here.

Indenting the <img> by two spaces shows that it lives inside the link.