Learn HTML by Building a Cat Photo App - Step 17

I cannot figure out what error I am making. It says I need to put a closing a tag somewhere. I put it at the end, and I cannot figure out where else I need to put it.
Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <p>Everyone loves <a href="https://freecatphotoapp.com">cute cats</a> online!</p>
      <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
      <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 mobile information:

iPhone - iOS18.1.1

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

Link to the challenge:

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!

follow the example that was given:

<a href="example-link">
  <img src="image-link.jpg" alt="A photo of a cat.">
</a>
1 Like

Do I need to copy this directly or just erase what I already have? It doesn’t make sense to copy that line of code and put it after the img and anchor elements that exist in my code currently.

I guess I don’t have a good idea of what they are wanting me to do other than embed the img into the anchor tag and change the link.

I figured it out. But they need to be more clear on what they want you to do. I thought based on the wording that they wanted me to edit the existing code that had an anchor element and href attribute and close it off. Turns out I needed to add a whole other line of code to the mix that had another anchor element and href attribute. It was very confusing the way the prompt was laid out.

can you show the answer of it? I’m having the same struggles with it myself

hi @olivermacdonald95 , we don’t share solutions on this forum. Please create your own topic to ask for help

If you have a question about a specific challenge as it relates to your written code for that challenge and need some help, click the Help button located on the challenge. This button only appears if you have tried to submit an answer at least three times.

The Help button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.