Learn HTML by Building a Cat Photo App - Step 15

Tell us what’s happening:
Describe your issue in detail here.

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

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

<!-- User Editable Region -->


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0

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

Link to the challenge:

hello :smiley:

please describe your problem


I’m trying to turn a picture into a link and I don’t know how to do that. I’ve tried everything I’ve learned so far (which isn’t much lol). Can you help?

tags often but not always come in pairs:
this is an opening paragraph tag <p>
this is a closing paragraph tag </p>

tags can go inside of other tags, often called ‘nesting’

the opening tag is where attributes are put.
attributes can do many things,
an href tells the browser where to go when a link is clicked,
a src attribute tells the browser where to find an image

your <img> tag with its atributes should be between an anchors opening and closing tag, (it should be ‘nested’ inside an anchor)

example of nesting


your href attribute should be inside the opening anchor tag, the same way your src attribute is inside the <img> tag

1 Like

Hi! Welcome to the forum.

There is a mistake. You have to nest the image into the “a” element. Like this:

<a href="link"><img></a>

Clicking on the image would take the user to the link in the “href” attribute.

1 Like

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