To nest image with a

Tell us what’s happening:

<h2>CatPhotoApp</h2>

<main>

  <p>Click here to view more <a href="#">cat photos</a>.</p>

<a href="#"<img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">

</a>

  <p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

  <p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

</main>

Your code so far
can anyone help regarding this


<h2>CatPhotoApp</h2>
<main>
<p>Click here to view more <a href="#">cat photos</a>.</p>

<a href="#"<img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">
</a>
<p>Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
</main>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36.

Challenge: Turn an Image into a Link

Link to the challenge:

Hi. Which tests are failing?


This tag is not closed.

i have closed the the a tag

Is your code working now? Do you need more help?

<!DOCTYPE html>
<html>
<body>

<h2>Image as a Link</h2>

<p>The image is a link. You can click on it.</p>

<a href="default.asp">
<img src="smiley.gif" alt="HTML tutorial" style="width:42px;height:42px;">
</a>

</body>
</html>

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Ciao, si va bene! Chiedo scusa per mia insaputa .

okay got it thanks

1 Like

no its not working

<a href="#"<img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back."></a>

this is what i wrote

error getting:

Your a element should be a dead link with a href attribute set to #.```

You’re still missing the closing tag here.

you are talking about this only right
</a>

I should have said that a bit more clearly.

You did not close the opening tag. Every tag needs a < and a >. Your opening a tag is missing a >.

yaa it worked out Thank you so much it was very silly mistake I was unable to figure it out
thank you

1 Like

I’m happy to help. We’ve all been there.

2 Likes

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