Card: List

Lists

Order in the Chaos of Words

HTML lists are like the diligent assistants of an alchemist, ensuring your secret ingredients don’t end up in an explosive mess. Without them, your instructions would read like the recipe for a disastrous potion. With lists, however, the ingredients line up neatly, like bottles on a shelf, ready to make your brews a success.

Whether it’s a wild collection of herbs and elixirs or a carefully ordered sequence for the perfect potion, lists keep everything in check. And for those particularly secret formulas, there are even definition lists, weaving terms and their meanings as intricately as the final secret of a spellbook.

Lists, Orders, and Nested Structures

Make content clear and organized!

Token: Unordered Lists

Unordered Lists

Bullet Points Without Numbers

Unordered lists are like the magical notebook of a scatterbrained wizard—nothing follows a fixed order, yet everything is somehow essential. Whether you place the wolfsbane before or after the unicorn hair doesn’t matter—what’s important is that everything is accounted for. Start with the <ul> element to create an unordered list, and then add the list items using the <li> element.

<ul>
    <li>Unicorn hair</li>
    <li>Wolfsbane</li>
    <li>Fairy dust</li>
</ul>

ul: unordered list
li: list-item

Token: Ordered Lists

Ordered Lists

Numbered Steps for Success

Ordered lists are essential when you want to ensure your potion doesn’t explode. Start with the <ol> element, then add each step as an <li>—first the fairy dust, then the unicorn hair, and finally a drop of toad tears. Follow this order, and your elixir will be a guaranteed success, free from disaster!

<ol>
    <li>Fairy Dust</li>
    <li>Unicorn Hair</li>
    <li>Toad's Tear</li>
</ol>

ol: ordered list

Token: Customizing List Markers

Customizing List Markers

Shape Your Enchantment

Why settle for ordinary? With the start, value, and type attributes, you can number your lists however you like—digits, letters, Roman numerals, the sky’s the limit. Begin your list with the letter Z or jump into the middle as if logic were a mere mortal’s game. After all, when magic’s involved, who needs rules?

<ol start="5" type="a">
    <li>Find Recipe</li>
    <li value="1">Ingredients</li>
    <li>Cast Spell</li>
</ol>
Token: Nesting Lists

Nesting Lists

For Detailed Instructions

Why stop at a single list when you can nest lists within lists? Nested lists are like magical mirror chambers, endlessly profound and brimming with surprises. Mix ordered and unordered lists to craft a structure so intricate that even a master of labyrinths would tip their hat in admiration.

<ol>
    <li>Finding
        <ol type="a">
            <li>The right place</li>
            <li>The magical artifact</li>
        </ol>
    </li>
    <li>Gathering
        <ul>
            <li>Unicorn Hair</li>
            <li>Fairy Dust</li>
        </ul>
    </li>
</ol>
Token: Definition Lists

Definition Lists

The Magical Lexicon

Definition lists are the hidden pages of an ancient spellbook. Terms and their meanings dance side by side, like a gathering of wizards debating the meaning of life itself. With this type of list, you bring definitions to life, creating explanations so enchanting they might even summon wisdom from the clouds.

<dl>
    <dt>Unicorn</dt>
    <dd>A magical horse with a horn</dd>
    <dt>Pegasus</dt>
    <dd>A flying horse</dd>
</dl>

dl: description list
dt: description topic
dd: description definition

HTML
<!-- HTML -->
<h1>Recipe for the Healing Potion</h1>

<!-- Ordered list of steps -->
<ol>
    <li>Collect water from the Greenwood Hollow spring</li>
    <li>The following ingredients must be gathered:
        <!-- Nested unordered list -->
        <ul>
            <li>Moon Herb</li>
            <li>Glowing Berries</li>
            <li>Stardust</li>
        </ul>
    </li>
    <li>Mix the ingredients under the moonlight</li>
    <li>Add five drops of Dragon's Tear</li>
</ol>

<!-- Unordered list of required tools -->
<h2>Required Tools</h2>
<ul>
    <li>Alchemy Cauldron</li>
    <li>Magic Spoon</li>
    <li>Jars for Storage</li>
</ul>

<!-- Description lists for the ingredients -->
<h2>Description of Ingredients</h2>
<dl>
    <dt>Moon Herb</dt>
    <dd>A rare plant that only blooms during a full moon.</dd>

    <dt>Glowing Berries</dt>
    <dd>Small berries that glow in the dark and possess healing powers.</dd>

    <dt>Stardust</dt>
    <dd>A magical powder collected from the remnants of falling stars.</dd>
</dl>
Scroll to Top