Learn HTML by Building a Cat Photo App - Step 14

Hi I’m quite confused on this step, I can’t get round to what I need to add or remove and I need help figuring out where to put the a tag, I might have added an extra?

  **Your code so far**
<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."</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/104.0.0.0 Safari/537.36

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

Link to the challenge:

@H3xrtStr1ngz you have forgotten close the img tag . Remember it is an self-closing tag

Sorry it still doesn’t quite work, have I made a mistake?

@H3xrtStr1ngz img tag is a self-closing tag <img/>

Look back at the img element you had on the last step. The img element shouldn’t change on this step.

<img src=“source.jpg” alt=“image name”/>

FYI, the /> isn’t strictly necessary for self closing tags. Many validators will consider this a bad practice nowadays.

I know that but it is easier to differentiate the self-closing tag so that there is no confusion for the newbie

So you are choosing to teach them something they are not supposed to do? I am not so sure that is a good idea.

some times yes i will

Sorry I’m stil quite confused, have I added an extra anchor tag or something?

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

Ok. I don’t think its a good idea to teach wrong things.

Be aware, I have a tendency to point out when someone says something wrong so the learner doesn’t use the wrong information in the future.

You have the opening anchor tag, but you deleted the closing anchor tag.

img elements should not have closing tags, but anchor (a) elements are required to have closing tags.

@H3xrtStr1ngz now you have forgetten to add closing anchor tag

Thank you so much the two of you I managed to complete it after quite a long time of confusion!

1 Like

Good work getting the code passing!

1 Like

thank you very much @H3xrtStr1ngz

1 Like

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