Learn HTML by Building a Cat Photo App - Step 14

I don’t understand what I’m doing wrong. The challenge is to include an anchor tag and link the image to the website, but every time I’m being told " You should only add one opening anchor (a ) tag. Please remove any extras." Please help me.

<html>
<body>
  <h1>CatPhotoApp</h1>
  <main>
    <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>
    <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.">
  </main>
</body>
</html>
  **Your browser information:**

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14816.131.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36

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

Link to the challenge:

looks like you forgot the closing anchor tag </a>?

That’s not working either.

may I see your new code please?

  <a href="https://freecatphotoapp.com"</a><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">

the anchor tag is still malformed. Recall that an anchor tag looks like this:

<a href="this is a link">Click Me!!</a>

Notice that in your last post, the code did not close the start tag correctly
and did not place the end tag to the right side of the image.
These issues would cause the code to be not accepted by the step test.

hope this helps

It still isn’t working :frowning:
It keeps saying " Your img element should be nested within the anchor (a ) element. The entire img element should be inside the opening and closing tags of the anchor (a ) element."

please post the newest code so I can compare it to what I think it should be

  <a href="https://freecatphotoapp.com">Click here</a><img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">

oh dear!

You seem to have copied the example code I provided into the exercise.

Of course my example will not help you to pass the exercise if you copy it as-is.

Please instead try to understand the example. Then you can use what you learnt to create a good link.

If I am not doing a good job explaining anchor links, you can also review this article:

1 Like

I figured it out! I needed to add the /a to the very end after the alt description of the cat picture.