Stuck on intro HTML 5

Tell us what’s happening:
I don’t know what I am doing. HELP!

Make sure each of your p elements has a closing tag. has a x by it

The closing main tag should come after the second closing paragraph tag.has a x by it

Your code so far


<h2>CatPhotoApp</h2>

<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>
<main>
     <p>Purr jump eat the grass rip the couch srcatched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scaratched.<p>
</main> 

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/basic-html-and-html5/introduction-to-html5-elements/

Opening tag:

<p>

Closing tag:

</p>

The main element should have two paragraph elements as children. what do i need to here?

The children element is inside the tags of the parent element, you have only one p that is inside the mail element, the other p is outside of it

can you show me an example?

can you show me an example of what your talking about?

So you would do

<main>

<p>
Content
</p>

<main>

If you move the <main> tag to before the first <p> tag you will be fine

I tried





and i still get The main element should have two paragraph elements as children.

Surely that just means that it wants to you to put in

<p>
Content1
</p>

<p>
Content2
</p>

this is what i see

This is what i see and its driving me crazy

You need both <p> elements to be nested within the <main> element, not just the second one. The first <p> that begins “Kitty ipsum…” should have your <main> tag directly above.

Like this:

<main>
<p>Kitty ipsum…</p>
<p>Purr jump…</p>
</main>

1 Like
<parent>
  <child> </child>
  <child> </child>
</parent>

Now obviously parent and child are not real HTML elements, I used them to show you an example of what the lesson is looking for. (And besides, someone gave you the answer)

2 Likes

I guess I tried… :sleepy:

place main open tag just below h2. you have to include both p within the main tag