Why does the validator does not approve this code?

Tell us what’s happening:
the validator is not passing this code:

View more cat photos


what am i missing here?

  **Your code so far**

<h2>CatPhotoApp</h2>
<main>

<a href="https://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>
<p>View more <a href="">cat photos</a></p>
</main>
  **Your browser information:**

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

Challenge: Nest an Anchor Element within a Paragraph

Link to the challenge:

Hi,

your a element is not nested in a p element!
And do not forget to add: View more

1 Like

hi moriel,
thank you for your reply.
but i still do not understand … if you look at the last line of the code (just before the closing of the main element is have got a p-tag and in the p element i have used the anchor tag.
I am clearly missing something here, but i really do not know what!

Hi lexhardy,

It looks like the challenge wants you to edit the existing instead of creating a new paragraph. Try removing the

statement at the end of your code and editing the one at the top instead.

Hi Kiitsunami,

Unfortunately no, this didnt work either. I need to create a new P element like i did.
and after finishing i should have 3 P elements.

Oh well … i will move forward with the other parts. Thank you anyway for the suggestions.

KR
Lex

lexhardy,

Don’t give up yet! Have you tried making the change to the top

element, as well as creating three

elements at the bottom to satisfy both requirements?

Can you post your updated code so we can see if there’s something else going on?

~k

the tests see this one and fail you - you need to have only one a element in your code

Hi Ieahleen, that was it! :slight_smile: thanks for the sharp eye

ok - this is

element that needs to be nested with an in order to pass the test.

the three additional

elements at the bottom can be whatever you like, but the one at the very top of your code that you posted must have the nested anchor element in order to pass.

Hi Kiitsunami,

i managed to pass the test when i did the fix as asuggested by Ieahleen. Thanks for your time. :slight_smile:

Kr
Lex

1 Like

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