Turning an img into a link

Hi guys.
This the error i keep facing:
Your anchor ( a ) element should have an opening tag. Opening tags have this syntax: <elementName>

what’s the problem?
i passed this test once but now i cant :smiley:

  **my code **

<html>
<body>
  <h1>CatPhotoApp</h1>
  <main>
    <h2>Cat Photos</h2>
    <p>Click here to view more cat photos.</p>
    <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>
  </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/101.0.4951.67 Safari/537.36

Challenge: Step 14

Link to the challenge:

Mod Edit: SOLUTION REDACTED

still it doesn’t work :expressionless:

go back a step or two because you have messed with your code a lot. you have deleted an ancor element from the words “cat photos”

I think you’ve accidentally changed some of the code above the editing area.

When I go to that step, I see

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

The code you posted just has

<h2>Cat Photos</h2>
    <p>Click here to view more cat photos.</p>

Your code passes for me, so I would restart the step and try your code again.

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

Thanks. I will be more careful in the future.

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