Learn HTML by Building a Cat Photo App - Step 15

Tell us what’s happening:
It’s been nearly 2 hours and I’m not able to fix this code. Tried every possible way. Someone help me pass through this

Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>See more cat photos in our gallery.</p>

<!-- User Editable Region -->

      <a href="https://freecatphotoapp.com">
        <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg">
    </a>

<!-- User Editable Region -->

    </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/117.0.0.0 Safari/537.36

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

Link to the challenge:

1 Like

Great work! Looks fine. I am not sure about specifics of lesson. But maybe try ‘target=“_blank”’ to open the link in a new window. Place it in the opening ‘a’ tag.

2 Likes

Thanks for the reply, but sadly I’ve tried that already .
This is the error that I’m getting constantly:
" Your anchor (a ) element should have an opening tag. Opening tags have this syntax: <elementName> ."

2 Likes

Hello!

A few things with the code.

First there should not be any changes made to the provided code. It appears the alt and its value have been removed from the provided code at the beginning of the step.

Another very important thing to watch in coding is spaces. Do not use the enter to place anything on a new line or add additional spaces, if it is not stated to do so in the intructions.

Suggestion: Reset the step and only place the opening anchor tag before the <img , and the closing anchor tag after the closing angle bracket >

Keep up you good progress!

Happy coding!:slight_smile:

2 Likes

Hi,
Thanks for the reply, I’ve already cleared that step and realized that we shouldn’t change the given code. I’ve tried everything and got fed up at this step and then saw YouTube and realized that it was such a small step but i was busy in changing the entire code :smiling_face_with_tear: . Thanks for all the suggestions :v:

2 Likes

Keep up your good progress! :slight_smile:

2 Likes

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