Learn HTML by Building a Cat Photo App - Step 17

Tell us what’s happening:

Hi everyone,

I’m working on the FreeCodeCamp lesson where I need to wrap an image inside an anchor () tag to make it a clickable link. However, I’m getting an error saying:
“You are missing a closing (a) tag after the image.”
Here’s my code:

A cute orange cat lying on its back.

I have checked multiple times what could be causing this?

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <p>Everyone loves <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/running-cats.jpg">cute cats</a> online!</p>
      <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
     <a href= <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">

<!-- User Editable Region -->

    <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."/></a>


<!-- User Editable Region -->

    </main>
  </body>
</html>

Your browser information:

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

Challenge Information:

Learn HTML by Building a Cat Photo App - Step 17

Welcome to the forum :wave:
You’ve made multiple attempts here. If you leave all of this code here you cannot pass the test.

Here you didnt complete the <a href tag:

Your second attempt is better but please compare your two image tags, at the end:

cat lying on its back.">
cat lying on its back."/>

One of those is correct and one isn’t

This is not a valid anchor tag.

This is valid but the invalid code above is being seen by the tests first