Learn HTML by Building a Cat Photo App - Step 14

Yep - totally stuck on this one. How do I make the picture a link please?

  **Your code so far**
<html>
<body>
  <h1>CatPhotoApp</h1>
  <main>
    <h2>Cat Photos</h2>
    <!-- TODO: Add link to cat photos -->
    <p>Click here to view more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a>.</p>
    <a href="https://freecatphotoapp.com" img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."</a>
  </main>
</body>
</html>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

Challenge: Learn HTML by Building a Cat Photo App - Step 14

Link to the challenge:

You make it the exact same way as you made the text ‘cat photos’ into a link. Put opening and closing anchor tags around a valid image element.

You have broken the image element.

Thanks. I have tried it in a number of places and ways but no luck. Do you have any tips please?

Make absolutely zero changes to the img element. Only add the anchor tags. Delete nothing from the starting code.

This is what I think is what it’s asking, but I have no idea where it has gone wrong: <a href="https://freecatphotoapp.com"><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">

You don’t have a closing anchor tag

Blimey that was hard work. Thanks for your help. I need to stop thinking like a designer and learn to think like a developer :slight_smile:

1 Like

It takes practice getting used to how literal computers are

1 Like