Turn an Image into a Link .?

Tell us what’s happening:

Your code so far


<h2>CatPhotoApp</h2>
<main>
  <p>Click here to view more <a href="#">cat photos</a>.</p>
<a>
  <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 6.1; rv:62.0) Gecko/20100101 Firefox/62.0.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/turn-an-image-into-a-link/

The <a> around the <img> is missing the href attribute set to #

Follow what @kevcomedia said.

One thing i noticed is you have an extra “>” here.

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

i can’t understand that?

An <a> element is a dead link if it has the href attribute set to #. The “cat photos” link in the code is an example of that. You’ll do the same with the <img>

Adding to what @kevcomedia said, when a tag has href set to say freecodecamp.org or any other website or any link, then it takes you to that page. Similarly, if href is set to id of some section of the page, it takes you to that part.
However, when href is set to “#”, the link does nothing, it is simply clickable and that’s it i.e. it is a dead link.
Hope that helps.

can you send me screenshot?

See this:
Dead link
This is a dead link.
Code for this is :

<a href="#">Dead link</a>

Does that help?

1 Like

You do not have href attribute for the a tag which nests the image.
Look at the example given in the challenge and it describes how to put img element inside a tag.

i got it… bro