Published Aug 4, 2021Updated Aug 2, 2022
Contribute to Docs

In HTML, lists are used to group pieces of related data together in a certain format. List items are represented by the <li> tag while the lists themselves are represented by the following:

Nesting Lists

Lists can be nested, meaning one list of one kind can be placed inside another list of another kind:

<li>Apples 🍎</li>
<li>Oranges 🍊</li>
<li>Tomatoes 🍅</li>

This way, multilevel lists can be created with different indentations.

Rendered nested lists example

All contributors

Looking to contribute?

Learn HTML on Codecademy