A list of a list of things.
Each thing is represented by a list item.
The nested list is such a thing. It has to be part of a list item so that it can be in another list.
It might be easier to understand if you fix the errors in your example and indent it properly.
li {
background: #faa;
padding: 2px;
margin-top: 2px;
margin-bottom: 2px;
}
li li {
background: #afa;
}
li li li {
background: #aaf;
}
li li li li {
background: white;
}
- Louis
- Louis
- Louis
- Louis
- Louis
- Louis
- Louis
- Louis
The end tag for a list item can always be omitted. Some tags are simply optional in HTML. The element will be ended when the parser hits a end end tag for the list or a start tag for the next list item.