Learn HTML by Building a Cat Photo App - Step 15

Tell us what’s happening:

The test is failing, however when I click on the image in the preview screen it works as expected.

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>Click here to view more
        <a target="_blank" 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>
      </p>
    </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/107.0.0.0 Safari/537.36

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

Link to the challenge:

I think they are not expecting this target attribute to be there so I would remove that and try again.

That is there to open the link in a new tab. As I said when I click the image in the preview window it works as expected! :grinning:

Edit: I just noticed you have some extra code as well that is not expected to be there.

You should probably reset the whole step and try this one again.
They only want you to add an anchor tag. Not a paragraph tag.

1 Like

So I tried your code, it works as it should but for some reason it won’t pass the test.

The way you wrote it, it almost looks like you just pasted the “img” inside the previously
created “a” tags above it.

Try using your same code but keeping it all on line 8 as the lesson has that area selected.
Once I did this, I just rewrote your code from scratch around the “img”, the test passed for me. Hope this helps!