Tell us what’s happening:
Describe your issue in detail here.
Still stuck step 15. I’ve tried to put the anchor opening tag ( <a href=“”) in different places without success. I really don’t understand what am I supposed to do to turn the image into a link. TIA.
Your code so far
<html>
<body>
<h1>CatPhotoApp</h1>
<main>
<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="<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>
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) 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
thanks and sorry for being a pain. I just don’t know where to write it. Before the <img tag ? When I write that right like you told me it sais " its not possible to have 2 opening anchor tags. Sorry for being a pain, again.
To turn an image into a link, you can simply nest the whole img element (unaltered) inside a pair of anchor tags. Then you give the opening anchor tag an href attribute which points to the desired url.