Step 14 Cat App need help

This is the task: Step 14

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

This is what I wrote:

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

This is the response:
You should only add one opening anchor (a) tag. Please remove any extras. Your img element should be nested within the anchor (a) element. The entire img element should be inside the opening and closing tags of the anchor (a) element.

What have I done wrong? I have been stuck on this line all day. Also, I am not sure what it means by “your img element”
I am very lost on how to go forward. Any help would be appreciated.

1 Like

HI @ejfad !

Welcome to the forum!

The test wants you to nest the img element inside the anchor tags.
The opening anchor tag should go before the img element and the closing anchor tag should go at the end of the image element.
I would reset the lesson and try again.

Hope that helps!


I am confused about what nesting the img element even means. Do i have to add <img after the href link? Im sorry, I’m not really following what it is trying to ask.

The term nesting means to put one element inside the other.

Here is an example of nesting a p element inside a div element.

  <p>This is nesting</p>

You see how the opening div tag comes first,


then the p tag

<p>This is nesting</p>

then the closing div tag


The same concept applies to this challenge.

opening anchor tag goes here
img element goes here
closing anchor tag goes here

Hope that helps!


So it could be like:

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

Im just trying to make sure I’m following the example. So is the img element the entire line?


Yes, that is correct.

That is nesting.

You will doing that a lot with HTML :+1:

1 Like

Thank You! You have been much help!