Super lost please someone help

This is where I got lost. What are children? All these unknown terms :frowning:

What’s a good book I can get? I really need one that explains it for absolute idiots.

A child in this context means that its a descenant of another element. so if an element is ‘wrapping’ or holding some other elements like the following example, and in this case consider an element to be something that is enclosed in two tags:

<p>some text</p>
<p>some other text</p>

so you see that the above main element has two children p elements because its ‘wrapping’ or ‘holding’ these things if you will. and for the challenge make sure that your main is only holding two p elements.


Lesson problem: The main element should have two paragraph elements as children.

<!-- This is the main element.  -->
    <p>this is child paragraph #1</p>
    <p>and this is child paragraph #2</p>

You should look into this free course from Udacity. It might be easier to absorb the information in a more visual way. Here is an example video.


Hey welcome! :blush:

Okay, just for one moment, think elements as boxes.

Now imagine we have an <div> element that is the main box and inside there are two boxes sitting in there, one is a <h1> box and another is <p> box.

The (<div>) box that contains those ‘inner’ boxes are the parent element .

The two boxes (<h1> and <p>) that are sitting within the <div> box - the parent - are the children.

In programming term, you would hear “the child element is nested within the parent element” - this means the child element is inside the parent element and also the parent element is wrapping the child elements - that would mean the parent element is containing those child elements.

Also, note you can have more than one…for example,

elements (boxes) within the parent. This may be a clue to that challenge :wink:

I would recommend finding a video course that also involves at least one project because you get to code as you learn (which helps to absorb it in). I know Udemy do really good ones and they have free courses also. Udacity is best to learn the concepts too :slight_smile:

If it is that same course, I took it a while back and it was really helpful actually, so I agree this is recommended :slight_smile:

1 Like