Cant pass this test

Tell us what’s happening:
I’m writing the code 100% right but I can pass this test.


<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="http://freecatphotoaap.com" target="_blank">cat photos</a></p>

</main>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36.

Challenge: Nest an Anchor Element within a Paragraph

Link to the challenge:

You didn’t tell us what test are failing, but I see a few problems.
You have multiple a elements, which I suspect is wrong.
I can see at least two typos in one of your a elements.

Hi Ariel, thank you very much for your willing to help me.

I’m still confused with the platform, I just starting today.

This is what I must accomplish:
Nest the existing a element within a new p element. The new paragraph should have text that says “View more cat photos”, where “cat photos” is a link, and the rest is plain text.

This is the code I made:

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

This is the result:
// running tests
Your a element should be nested within your new p element.
// tests completed

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

I can tell that is not the existing anchor element that freeCodeCamp provided, because it contains typos in the url.

You were told to nest the existing a element in a p element.

Thank you again, and sorry for my ignorance pasting the code improperly.

I change the anchor text from but it doesn’t work either.

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

Don’t add an anchor tag. Just use the one that they provided.

I’m sorry to say that I don’t understand what you mean by “Don’t add an anchor tag. Just use the one that they provided”.

As far as I know, they don’t provide any tag. OR, to me as a newbie, this is very poorly explained.

I made the code with exactly the same structure that is shown in the video, and the link works, it takes me to the new tab.

there is this one already present in the editor

Nest the existing a element within a new p element.

This is the existing a element that is in the starter code.

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

That is the one I used, but It doesn’t work.

you have two different a elements in your, one was in the starting code, one you wrote yourself. You need to have one single a element.

also, not the same as what you wrote, you have for example aap instead of app

2 Likes

In your code you have it twice, i.e. you added it again. Just use the one already in the code from the start and wrap that inside the new p element that you have to add.

1 Like

Yeeesss, I foun it. Thank you

Yes, I just found it :slight_smile: