My code is not working why

My code is not working I can’t seem why

Your code so far


<h2>CatPhotoApp</h2>
<main>
  
  <a href="http://freecatphotoapp.com" target="_blank">cat photos</a>
  
  <img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">
  
  <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>
<p> View more<a target="_blank" href="http://freecatphotoapp"</a>cat photos</p>

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/nest-an-anchor-element-within-a-paragraph

you are missing a > after the href= in the last line.

But I have the a.I don’t understand. Can you write it down?

Edit: This was only half right. Answer below.

1 Like

this is what I was trying to write out but for whatever reason it was not allowing me to write the website name and refused to allow me to post.

You need to put html between two `` on this forum otherwise the browser will just read it as an actual p tag.

Good job! This is very interesting, although I also thought that you missed a couple of pieces. But they have already been written in the messages above.

Still not working the code i introduced the code you gave me above and not working

Now is working I think it was something technical.

This isn’t actually correct.

You’ve not assigned the a tag to anything as you closed it before the ‘cat photos’ text, which is the intended target to pass the lesson. I think you may have accidentally copied and pasted the first line of code twice.

It should be this:

<p>View more <a href="http://freecatphotoapp" target="_blank" >cat photos</a></p>

Also note that it’s better practice to use target="_blank" after assigning the href.

it takes a little while to find the mistake, but you put you a tags like this.
<a target = "_blank" href = "..."</a>cat photos</p>
try and check you syntax, because you have a major error.

  1. your <a> tag is not arranged properly. it should go like this:
    <a href = "..." target = "_blank"></a>
    look at your <a> tag. ^. please put the closing mark there
  2. the reason why your cat photos text does not show is because you need to wrap it inside the <a> tag so it should look like this:
    <p>View more <a target = "_blank" href = "...">cat photos</a></p>