Introduction to HTML5 Elements please help~

Introduction to HTML5 Elements please help~
0

Tell us what’s happening:

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 scratched sunbathe, shed everywhere
              rip the couch sleep in the sink fluffy fur catnip scratched.</p>
</main>

Your browser information:

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

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

Little late but it says that you have to wrap all your paragraph element into the main element.

You can watch the video if you can’t find the answer or use the hint to save time. Hope it helps you.

1 Like

i watched the video and have everything right but its saying the main element should have two paragraph elements as children. i dont understand what that means.

You don’t have everything right. Look at the hint.
EDIT: now I know why this question is asked every day. The video is wrong, everyone is copying the video.

2 Likes

i used the hit but i don’t see the problem I’ve tried everything adding the h1 to top im super new to this and i’m trying to figure it out

and what does it mean by children?

so how do i go about fixing it?

Read the directions closely

Create a second p element after the existing p element with the following kitty ipsum text: Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

Wrap the paragraphs with an opening and closing main tag.

Like @eoja said, carefully look at the code and the instructions. How many

elements do you have inside of your tags?

<parent>
       <child>
       </child>
</parent>

When you nest HTML elements inside one another think of that nesting like a family tree. The outer elements are ascendants and inner (nested) elements are their descendants.

Example:

<html>
  <head>
    <title>This is HTML</title>
  </head>
  <body>
    <h1>This is an HTML Header Level 1<h1>
  </body>
<html>

The above HTML can also be visualized/thought of as a tree structure, like so:

                                             html
                                              |
                                          +---+----+
                                          |        |
                                        head      body
                                          |        |
                                        title      h1

So, we can talk about the html above by saying:

  • the html element is the parent of both the head element and the body element
  • the head element and the body element are siblings
  • the head element and the body element are both children of the html element
  • the head element is the parent of the title element
  • the title element is the child of the head element
  • the body element is the parent of the h1 element
  • the h1 element is the child of the body element

These definitions are all based on a tree data structure which is the data structure used by the internal representation of HTML in a browser. You’ll learn more about this when you start learning JavaScript, but if you want a quick high-level overview you can skim the Document Object Model Wikipedia page.

So when the instructions say “the main element should have two paragraph elements as children” it just means that you should have two paragraph elements that are nested inside the main element.

i don’t know why i can’t figure this out… i know the concept but i’m still lost i understand the tree graph but i can’t put it together. please help i want to fully understand this so i can tackle this.

Buddy, your main element(which will be the parent) should consist of two(2) paragraph elements. Wherein, the paragraph element will be the child.


i have the main element and the two paragraphs but i’m lost on the child. i don’t knw what i’m doing wrong.

CatPhotoApp

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

Kitty ipsum Purr jump eat grass rip the couch scratch sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

Kitty ipsum Purr jump eat grass rip the couch scratch sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched

~this is what i have so far~

The 2 paragraphs are the child. Put those 2 inside the main element. Hope you get it

2 Likes

that was it thank you i understand now what i was doing wrong.

2 Likes

in the code you have two paragraphes right?!
the old one and the new, you have to right the tag
<main> above the both the old and the new one.
don’t forget to close each paragraph </p> for both pragraphs and </main> for the main tag