Im having trouble with nesting this code

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

  **Your code so far**<p> View more</p>


<a href="" target="_blank">cat photos</a>

<img src="" 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</p>
<a cat photos></a>
  **Your browser information:**

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

Challenge: Nest an Anchor Element within a Paragraph

Link to the challenge:

It’s because you’re adding the p element in the wrong section. The test says " Your a element should be nested within your new p element." The a element it’s referring here is the first a that has the innerText “cat photos” inside.
type or paste code here

ok so do i create another p element?

Yes, you need to add a p element that has the text "View more " (with the space) and then nest the a element in it.

<p> View More <a cat photos></a></p>
i did this and its still wrong

If you’re having trouble with nesting, here is an example.
<h1> This is an element
<span> This span is nested in h1 </span>

<h1> is nesting <span>
<span> is nested in <h1>

that example is not helping me fix the problem i tried that it isnt working

Hi @alvin1191 !

Welcome to the forum!

I would suggest reseting the lesson because there are a few errors.

Here is the first part of the instructions again
Nest the existing a element within a new p element.

This is the existing a element.

  <a href="" target="_blank">cat photos</a>

Do not create a new a element.
Just use that one.

Nest that a element inside p tags.

Basically that means you need to add an opening p tag in front of the a tag like this


and add an end p tag at the end of the a tag.


The final step is to add the text of View more.
The text goes after the opening p tag and before the opening a tag.

<p>View more <a

Hope that helps!

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 (’).

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