HTML Ordered List

When you need to lay out steps, rankings, or anything with a clear order, an HTML ordered list is your best buddy. It’s all about the <ol> tag—short for “ordered list”—and it’s so simple you’ll be numbering things left and right in no time. Let’s walk through it!

Here’s the basic setup:

<ol>
<li>Boil water</li>
<li>Add pasta</li>
<li>Eat like a king</li>
</ol>

Pop that in your browser, and you’ll see:

  1. Boil water
  2. Add pasta
  3. Eat like a king

The <ol> kicks things off, and each <li> (list item) gets a number automatically — no manual counting needed.

I’ve played with this a bunch, and it’s got some cool tricks. Want to start at a different number? Add the start attribute:

<ol start="5">
<li>Fifth thing</li>
<li>Sixth thing</li>
</ol>

That’ll show “5. Fifth thing” and “6. Sixth thing” — perfect for picking up where you left off.

You can even change the style with the type attribute. Try this:

<ol type="A">
<li>Step one</li>
<li>Step two</li>
</ol>

That gives you “A. Step one” and “B. Step two”. Other options are type="a" (lowercase letters), type="I" (Roman numerals like I, II), or type="i" (lowercase Roman). I messed with Roman numerals once for a fancy vibe—felt like a history nerd!


Here’s one I’ve used:

<ol>
<li>Wake up early</li>
<li>Code for an hour</li>
<li>Reward with coffee</li>
</ol>

It’s a morning plan, all neat and numbered. One slip-up I had: forgetting </li> still works, but closing them keeps it tidy. Next time you’ve got a how-to or a top-five list, slap an <ol> on it. It’s like giving your steps a VIP numbered ticket!

How-To Guides for HTML

No How-To Guide is available right now.

Keep Learning & Level Up!

Enhance your HTML skills with our in-depth tutorials and interactive quizzes.

Explore HTML Quiz