How to nest an existinga element with a p element

Tell us what’s happening:
Describe your issue in detail here.

  **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 target="_blank" href="https://www.freecatphotoapp.com"> cat photos</a></p>
 

You know, you should write something there :wink:
Also provide a link to the challenge - so we can see what you are supposed to do.

Someone had the exact same issue like yesterday, so I remember the answer:
Look at your code, the third tag is an a-tag. You were supposed to wrap that into the p-tags, the way you did at the bottom and nothing else.

You fail the tests because you currently have two a-tags but there should only be one.

For further info: on the left, below the assignment are the test cases written out. So you can see there, what you are passing and what failing.

The task specifically mentions that it wants you to use an already existing a element and nest that within a new p element.

So, you are allowed to make a new p element but not a new a element.

But in the code above, you are not using the existing a element. Instead you are creating a new a element outside of your main element. Use the a element that is already present inside your main element.

1 Like

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