Learn HTML by Building a Cat Photo App - Step 15

Tell us what’s happening:

Thanks in advance for any tips! I’m not sure where my issue with the code is? It appears that the image is linked to the href and should link properly. I have tried in multiple browsers and app as well.

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 in our gallery.</p>

<!-- User Editable Region -->

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

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:120.0) Gecko/20100101 Firefox/120.0

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 15

I only see a closing a tag, not an opening a tag

I put the opening anchor ahead of the href link, I was thinking that would point the image to the same link? Thanks for your rapid response!

I don’t see the new opening anchor tag in the code you posted. Can you post your code with the opening anchor tag?

Hopefully this displays the way I intend. I anchored both elements together.

Ok, you can’t use an anchor element like that. HTML elements are supposed to be nested - so you cannot close the p element with the a element still open.

You need to have 2 separate anchor elements for this step.

1 Like

Okay, thanks for your help! I’ll give it a try.

1 Like

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