Learn HTML by Building a Cat Photo App - Step 15

I genuinely don’t know what exactly is wrong with the way the code is written. I’ve wrapped the image and alt with the anchor and it’s still saying it’s wrong.

The exact message is this:
Sorry, your code does not pass. Hang in there.

You are missing a closing (a) tag after the image.

The question is: " Turn the image into a link by surrounding it with necessary element tags. Use https://freecatphotoapp.com as the anchor’s href attribute value."

Your code so far

<html>
  <body>
    <h1>CatPhotoApp</h1>
    <main>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->

<!-- User Editable Region -->

    <a href="https://freecatphotoapp.com"></a>
    <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>
    

<!-- User Editable Region -->

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

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

Link to the challenge:

Why did you add an empty anchor element above the p element? Don’t make any changes the instructions didn’t ask you to make. Even the slightest unexpected change can cause the tests to fail.

I have tried a ton of different combinations, so I was trying to see if that was the problem. I removed the anchor element but

It is still giving the same message:

Sorry, your code does not pass. Don’t give up.

You are missing a closing (a) tag after the image.

This is not the correct text for the p element.

I think you should restart the step to get the correct HTML back and then only do the following:

“Turn the image into a link by surrounding it with necessary element tags. Use https://freecatphotoapp.com as the anchor’s href attribute value.”

Wow thanks, I got it! I don’t know where the extra text came from but once i reset it and added the anchor it worked! Thank you!

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