Learn HTML by Building a Cat Photo App - Step 15

Issue :

Test

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

Hint

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

<html>
  <body>
    <main>
      <h1>CatPhotoApp</h1>
      <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>
  
    </main>
  </body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36

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

Link to the challenge:

Hi!
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.