Step 15 - Turn the image into a link by surrounding it with necessary element tags.
<img src=“https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg” cat photos
Error returned
Your anchor (a
) element should have an opening tag. Opening tags have this syntax: <elementName>
.
What am I doing wrong? Any help would be much appreciated. Complete new beginner here. Thank you
Welcome @DigitalDiva02 , what have you tried so far? Post your code so far.
Your img
element has no closing bracket
to do that you can edit your post and click </>
button to enable when it happens to be code you want to type or paste, else it won’t display code
Thank you. Still can’t get it. I’ve tried different ways. Is there any way I can see what it should be? Will help me learn better when I can see what it should look like.
you need to add < a href tag and copy the link >and also have a closing tag in< img src>.
Turn the image into a link:
<a href="url"><img src="url"></a>
Follow this instruction and you will pass the step.
P.S. This is not the final solution.
1 Like
the pencil on your post, so you edit the post and ensure the code is visible as I said. kindly add a link to the challenge as well
Thank you. Will try and find somewhere that has the full line of code so I can see where I am going wrong. Still can’t get it to work. Having a look again.
<img src=“https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg”</img src>
Simply copy the code on the challenge you are facing, and paste it here but with </>
so that the code is visible
Turn the image into a link by surrounding it with necessary element tags. Use https://freecatphotoapp.com
as the anchor’s href
attribute value.

Post the full html code here
I did and it just brings up the cat photo. I’ve split it below.
<img src=“https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg”
alt=“A cute orange cat lying on its back.”>
reset and do it again.
< a href=“.copy the link”>![....]()
1 Like
Hi, no, I couldn’t get it to work. Thanks.
okay. let’s do this step by step.
first add
< a href=“https://freecatphotoapp.com”>