Learn HTML by Building a Cat Photo App - Step 15

Tell us what’s happening:
So it is telling me to turn the image into a link by surrounding it with the needed tags. And I tried the best that I could but I still don’t understand where the anchor element has to go without doing anything to the image.

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 <a href="https://freecatphotoapp.com" 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 (X11; CrOS x86_64 14541.0.0) 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:

To anchor an img it is necessary to put the opening anchor before the img element, and the closing anchor after the last part of the img element, or attribute if there is one attached to the img element.

anchor then img element and its content and closing anchor at the end.

Think of the img as the central base for the anchors around it. Not sure if this will help you. But, I hope it does.

  • how did you turn “cat photos” into an “anchor” element?
  • now do that same for “img” element instead of “cat photos”, same concept, but now, you would be turning an “img” element into an anchor element

happy learning :slight_smile:

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