Learn HTML by Building a Cat Photo App - Step 15

Tell us what’s happening:
Describe your issue in detail here.
I’m having a hard time figuring out how to wrap an (a) around the . I’ve used different ways including what’s in previous post of others and still can’t get it. Need some assistance.
Your code so far

      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
      <p>See more <a target="_blank" href="https://freecatphotoapp.com">cat photos</a> in our gallery.</p>

<!-- User Editable Region -->

      <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 -->


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

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

Link to the challenge:

In the code you included above, the a tag is wrapped around the text “cat photos”. Is that what the instructions told you to do?

Turn the image into a link by surrounding it with necessary element tags. Use https://freecatphotoapp.com as the anchor’s href attribute value.

Ok. If you look at your code, you’ll see that it has turned some text into a link rather than the image. In order to turn the image into a link, the entire img tag must be nested inside the a tag.

I appreciate the assistance.

The img element should be wrapped around by an anchor element, Like so;
<a href="value goes here"><img></a>
You need an opening anchor tag before <img, and in that you need a href attribute with the required value (in the instructions) Close that tag with >
After the img element, add a closing anchor tag </a>
I hope this helps.
Thank you.

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