Learn HTML by Building a Cat Photo App - Step 15

Issue :


Sorry, your code does not pass. You’re getting there.


Your img element should be nested within the anchor (a) element. The entire img element should be inside the opening and closing tags of the anchor (a) element.

Your code so far

      <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>
   <img src="https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg" alt="A cute orange cat lying on its back."> <a  href="https://freecatphotoapp.com"></a>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) 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:

You should wrap the img element in the a element. Basically, before your <img, you should have your opening a tag with its attributes. Then place your entire img element. Then you should have an ending a tag. This way, you are nesting your img element inside the a element, by having the opening tag before it and the end tag after it.

hello and welcome to fcc forum :slight_smile:

do you see how you have turn “cat photos” into an “anchor” tag? you are supposed to do that same with this “img” tag as well, instructions also mentioned it how you can do so as well

Turn the image into a link by surrounding it with necessary element tags

simply “keep” this “img” tag within “a” tag, happy learning :slight_smile:

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