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

<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" <a href=https://freecatphoto.com/A cute orange cat lying on its back.">
    </main>
  </body>
</html>

Your browser information:

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

:balloon: Hi, welcome to the forum!
We see you have posted some code but did you have a question?

You have to nest your img element in a anchor tag and set the attribute with a link which they asked you to set.

yes i nested my img element in the anchor tag, and set the attribute with link but its still incorrect.

Have you set the alt attribute in your img tag ? your code is not correct make a alt attribute and set the value of it.

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

@tina77 why it’s not working? your code is right.

@tina77 I think you have to remove a dot after cat photos text.

Nope. Still not working. It said my anchor (a ) element should link to https://freecatphotoapp.com . You have either omitted the URL or have a typo.

lol never mind i got it. thank you!

1 Like

Hey, you can’t use <a> as attribute to <img> tag. You can turn images into links using nested to <a> tag. Example: <a target="__blank" href="YOUR_LINK"><img src="YOUR_IMAGE" /> </a>

how did you get this step ? thank you

If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

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