Tell us what’s happening:
Describe your issue in detail here.
I have tried many ways so far and apparently couldn’t get my solution passed. Any ideas?
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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Challenge: Learn HTML by Building a Cat Photo App - Step 15
Link to the challenge:
hbar1st
#2
You need to turn the img into a link by “surrounding it” with an anchor tag.
That means you need a valid opening anchor tag on the left of the img and a valid closing anchor tag on the right of the img.
1 Like
You have not wrapped anything within your anchor element .
And its wrongly written, the opening a
has no closing >
<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>
<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.">
</main>
</body>
</html>
I have updated my code per your suggestions & still it seems to not work. Am I missing anything more
Your img
is not wrapped within the anchor element and again you have wrongly written the anchor element
1 Like
I solved it now! Thank you!