Cannot figure out HTML step 15

I cannot figure out what I have wrong here

Step 15

Turn the image into a link by surrounding it with necessary element tags. Use as the anchor’s href attribute value.

My code:

<a href>="">
        <img src="" alt= "A cute orange cat lying on its back.">

Hi, welcome to the forum.

Note that your anchor tag is malformed.
Here is an example of an anchor tag with some text inside that becomes the link.

<a href=“the-link-URL”>Click Me!</a>

Try to make your syntax match this example (syntax is things like brackets and quotes)

1 Like

I don’t understand how the src is supposed to be nested within the a anchor

You can turn most of the HTML elements into clickable links if you surround them with an anchor tag.
A link is is exactly what it sounds like, its a “link” to some other website or webpage i.e. when you click it, it takes you to some other resource on the internet.

You have created links in the previous challenges but you were only using normal text until now. for example:

<a href="link-to-a-website"> Website name </a>

Note that the user will only see “Website name” and when they click on it, the browser will take them to “link-to-a-wesbite” (assuming such a website exists).

The same concept applies to images. You can turn images into clickable links if you surround them with an a tag. the user will only see the image but it will also be a link to some other website.

For example:

<a href="a-random-link">
    <img src="link-to-an-image" />

Hope this helps! :smile:



All attributes needs to be added with their values right after the opening tag. :wink:

Still not getting it:

<a href>="">A cute orange cat lying on its back.
        <img src="" />

you have an extra > after href which is causing the error.

Finally figured it out!

Can you please share the code I have the same issue.

hello there,

We encourage you to post a topic and ask for help rather than asking others to share their solution.
If you want to learn to copy-paste, then that is one way to go about it.
But if you want to learn to code, then debugging is an essential skill and can only be developed by failing and trying to find solutions multiple times by yourself.

(there are many volunteers here to help if you just go ahead and ask using the Ask For Help button)

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.