Learn

With the video and unordered list elements, you may have noticed something interesting: these HTML elements had other HTML elements nested inside of them.

For example, in unordered lists, li elements are nested inside the ul.

<ul> <li>First item</li> <li>Second item</li> </ul>

Web developers refer to the enclosing element as the parent element and the enclosed elements as children.

Referring to HTML elements as parents and children may sound funny, but it’s a core web development concept. The web browser also knows about these parent/child relationships, which will be important as we explore CSS in the next lesson.

Instructions

In the diagram to the right, notice the following:

  1. The ul element is the parent of each li.

  2. The li elements are children of the ul.

  3. Code indentation signifies the relationship between parent and child elements.

After you have familiarized yourself with the diagram, click Next to continue the lesson.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?