Learn HTML by Building a Cat Photo App - Step 15

Tell us what’s happening:
Describe your issue in detail here.
I feel like I fully understand the concept of wrapping the image but I’m still getting an error, I know the machine is right and I am wrong but I don’t know which or where I am wrong its telling me there should be only 1 anchor but when I delete it doesnt work

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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36 Edg/104.0.1293.63

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

Link to the challenge:

you seem to have a missing > at the end of the img tag

1 Like

Tell us what’s happening:
Describe your issue in detail here.
My element works the link works but the machine is telling me I have too many Anchors, I have learned to not question the machine, so please tell mw what i am doing wrong when trying to turn a image into a link

Your code so far

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

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

Link to the challenge:

1 Like

You deleted the closing > on your img element. You must not modify the img element.

1 Like

thanks that helps I have to close the image first makes sense. Why does the Code work correctly without the image being closed? just wondering

Your browser works very hard to guess and fix any mistakes you make so that it can try to make the web page render.

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