Turn an Image into a Link 111

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 herf="#"
  <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/74.0.3729.169 Safari/537.36.

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

The opening tag of your a element is missing the closing angular bracket >

I imagine this was your issue - if it isn’t you need to write about what you need help

1 Like

your a element is missing the closing angular bracket > so please close your a tag.

i added the closing tag as you said but its still showing this message: Your a element should be a dead link with a href attribute set to # .
but it is already set to #. so what what is wrong here ?

This is not href - careful with spelling

1 Like

i added the closing tag to the a element but its still showing the message: Your a element should be a dead link with a href attribute set to # . isn’t it already set to # . what i am doing wrong here ?

If you look above at your code in the editor., you may notice <img is not red whereas all your other tags are. That is the hint as to where your mistake is. Upon looking at the line before it,. you can easily see the a tag is not closed.

To place an element inside an a tag, it goes like this:
<a>NEW_ELEMENT_GOES_HERE</a>

You are attempting to do
<a NEW_ELEMENT_GOES_HERE</a>