Learn HTML by Building a Cat Photo App - Step 15

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.jpgcat 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.

Hi, so far I have <img src=“https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg

Oh that didn’t paste all for some reason.
<img src=“https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg

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.

A cute orange cat lying on its back.

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

After the <img src=“url” I added

Still not working. I need to see what the full code should look like. Perhaps this platform is not for me. I don’t want to become frustrated and put off by one platform. I would like to learn and need to start somewhere that suits my learning style. Thank you for your help, you have been fabulous!! May need to read up some more about tag and elements.

did you complete it?

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”>