Top Searches Google PlayPHPsexSquishQuerysquish\hiissue townFishTYPESCRIPTsquish city

#SquishTownIsOverParty (yes this is intentional if you are currently viewing from www.squish-town.xyz)

HTML Lists - Learn: QuerySquish.com

HTML Lists

In the previous lesson, we learned about HTML tables. Now, let's learn about HTML lists and how to use them to organise content.

Types of Lists

HTML provides three types of lists:

Creating Lists

Here are examples of each type of list:


    <!-- Ordered List -->
    <ol>
        <li>First item</li>
        <li>Second item</li>
        <li>Third item</li>
    </ol>

    <!-- Unordered List -->
    <ul>
        <li>First item</li>
        <li>Second item</li>
        <li>Third item</li>
    </ul>

    <!-- Description List -->
    <dl>
        <dt>Term 1</dt>
        <dd>Description for term 1</dd>
        <dt>Term 2</dt>
        <dd>Description for term 2</dd>
    </dl>
    

Nested Lists

You can also create nested lists by placing one list inside another:


    <ul>
        <li>Item 1
            <ul>
                <li>Subitem 1.1</li>
                <li>Subitem 1.2</li>
            </ul>
        </li>
        <li>Item 2</li>
    </ul>