Learn HTML by Building a Cat Photo App - Step 15

Tell us what’s happening:
I am struggling to convert the link to cat pictures to a clickable link
Your code so far

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->

<!-- User Editable Region -->

      <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>
<elementName>=  <a href="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg"> <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back.">
</a> </<elementName>
    </main>
  </body>
</html>

<!-- User Editable Region -->

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! remove the opening and closing ‘elementName’ tags. These are not recognized.

2 Likes

Welcome to the community!

As @albert_kucz has provided good guidance, I am only posting a link on how to turn images and text into links. It explains and provides great examples in it.
FCC News Article Turn Image and Text Into Links

Follow @albert_kucz guidance and you will pass the step.

Keep up the good progress!

3 Likes

I did that on the previous exercise and when I remove it now it says the code doesn’t pass but I will keep on changing a few things and see where it takes me. Thanks

3 Likes

Hello!

If you are still having difficulty with this step, please use the following as a reference on how to turn the image into a link? The requested anchor will not need the target and its value in it.

Note how the anchors are touching both sides of the words (which would be the image in this step not words). This creates the link.

I hope this helps you!

3 Likes

Thanks a lot did try that but I still have one error. See the attached. I have been stuck here for a good 2 days still trying . I am starting to loose my mind

1 Like

I did alteast I made a bit of progress but still struggling

1 Like

Thank you.

It should not be a href = img

<anchor><img and all within it><closing anchor>
2 Likes

Please reset the step?

Then, only place the opening anchor before the opening img < and place the closing anchor after the closing >.

No other changes are necessary for this step.

Keep up the progress.

3 Likes

Good work, Don’t give up! Thank for the second picture. It looks like the ‘a’ tag is closed to early. Move the ‘/a’ tag from before ‘img’ tag to after ‘img’ tag.

I get stuck a lot.

3 Likes

Thanks for the encouragement. It was all going well until now and I have been stuck for a couple of days, I will effect the changes and see what happens

1 Like