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> <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.
In the diagram to the right, notice the following:
ulelement is the parent of each
lielements are children of the
- Code indentation signifies the relationship between parent and child elements.
After you have familiarized yourself with the diagram, click Next to continue the lesson.