Home › Tutorials › HTML Tutorial › Nested Lists
Nested Lists

Nested Lists


17. Nested Lists

Lists can be placed inside list items to create sublists. This is useful for menus and topic hierarchies.

Syntax

<ul>
    <li>Main Item
        <ul>
            <li>Sub Item</li>
        </ul>
    </li>
</ul>

Example

<ul>
    <li>Frontend
        <ul>
            <li>HTML</li>
            <li>CSS</li>
        </ul>
    </li>
</ul>

Output

A main list item Frontend appears with a nested sublist containing HTML and CSS.
Example

🏋️ Test Yourself With Exercises

Take our quiz on Nested Lists to test your knowledge.

Browse Quizzes »