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:
- The
ul
element is the parent of eachli
. - The
li
elements are children of theul
. - 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
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.