Learn HTML by Building a Cat Photo App - Step 15

Tell us what’s happening:
Describe your issue in detail here.

So I have just reached Step 15 and is asking to make a link for the img, i’ve tried the best of of my ability and understanding however I dont seem to clear this step. Please help? Also if you could explain what I’m doing wrong would be really helpful. Thanks

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 -->

      <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" <a href= "https://freecatphotoapp.com" 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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36

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

Link to the challenge:

Welcome to our forum. What element do you use to make an element a link?

I think its img src ?

Img is the name of an image element.
You will need an anchor element to turn the img into a clickable link.

Similar to step 12 but instead of making cat photos become a link, the img element is what you are wrapping inside the anchor tags

I tried to involve whole of the img src element with the anchor however I have still not solved it.

This is my first time ever doing some coding so apologies - I’m pretty clueless!

For eg:

<img src=“https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg” alt=“A cute orange cat lying on its back.”>

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

The closing tag for anchor is in the wrong place . You have inserted it into the img tag instead of placing it to the right of the img tag (at the end of the line after the > )

Thank you. Finally understood where I made the mistake…

1 Like