November 26, 2022, 9:09pm
Tell us what’s happening:
Describe your issue in detail here.
Your code so far
<!-- 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.">
Your browser information:
User Agent is:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/188.8.131.52 Safari/537.36
Challenge: Learn HTML by Building a Cat Photo App - Step 15
Link to the challenge:
November 26, 2022, 9:10pm
Hi, welcome to the forum!
We see you have posted some code but did you have a question?
November 26, 2022, 9:17pm
You have to nest your img element in a anchor tag and set the attribute with a link which they asked you to set.
November 26, 2022, 10:10pm
yes i nested my img element in the anchor tag, and set the attribute with link but its still incorrect.
November 26, 2022, 10:19pm
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.
November 26, 2022, 10:46pm
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>
November 26, 2022, 10:50pm
@tina77 why it’s not working? your code is right.
November 26, 2022, 10:51pm
@tina77 I think you have to remove a dot after cat photos text.
November 26, 2022, 11:05pm
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.
November 26, 2022, 11:06pm
lol never mind i got it. thank you!
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>
December 8, 2022, 7:54am
how did you get this step ? thank you
December 8, 2022, 8:35am
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.
June 8, 2023, 8:35pm
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.