Learn HTML by Building a Cat Photo App - Step 15

Tell us what’s happening:

how can i turn an image to link i need a guide to finish it up

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>

<!-- User Editable Region -->

    <a/> href="catphotoapp-link">  <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."> <a/>

<!-- User Editable Region -->

    </main>
  </body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 15

hi there,
to turn anything (any element or text) into a link, just put the anchor opening tag on the left side of the element, and the closing anchor tag on the right.
Don’t forget to add the src attribute to the anchor opening tag.
(you can see an example of how you did that in your code if you look at how you turned the words ‘cat photos’ into a link)

Edit: quick example in case you need more help
<a src="www.google.com">Link</a>

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.