The a element should link to "https://freecatphotoapp.com"

Hello,

I cannot figure out what I am doing wrong.; I’ve rest the code many times. I am receiving two error messages:

You should only have one a element
The a element should link to “https://freecatphotoapp.com

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>

<a href="https://www.freecatphotoapp.com" target="_blank">cat photos</a>

<img src="https://www.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 href="https://www.freecatphotoapp.com"             target=_"blank"> cat photos</a>
</p>
  **Your browser information:**

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

Challenge: Nest an Anchor Element within a Paragraph

Link to the challenge:

Hi @tytiyanawheeler28
Welcome to FCC forum.

Take a close look at the error message.

You should only have one a element

Try removing the first a element.

Hi @nibble

Do you mind proving an example? I’m new to coding.

Challenge is to nest an existing <a></a> element within a <p></p> element.

This one is existing <a></a> element. :point_up_2:

You are not suppose to create new a element.

For example.

<p> I'm new paragraph
<a href="#">I already exist</a>
</p>
1 Like

When you read through your code, you will see a tag appearing more than once.
The first one is:

<a href="https://www.freecatphotoapp.com" target="_blank">cat photos</a>

The second one is:

<p>
View more         
<a href="https://www.freecatphotoapp.com"             target=_"blank"> cat photos</a>
</p>

The test is expecting one a element nested in p element like in the second. That is why I am saying remove the first a element for the test to pass. Make sure to take the p element inside main element.
Something like:

<h2>CatPhotoApp</h2>
<main>
  <p>
    View more
    <a href="https://www.freecatphotoapp.com" target=_"blank"> cat photos</a>
  </p>

  <img src="https://www.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>

image

I am so sorry, but I still do not grasp the concept. I believe ours look identical minus the elements main

Wowzers. I finally noticed the code was recorded twice. Thank you!!

2 Likes

Tytiyana…nevermind my post. I just saw yours that you found the second a element. Good work :slight_smile:

1 Like

No worries, thank you for helping!

You’re very welcome :slight_smile:

1 Like

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