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:
Pop that in your browser, and you’ll see:
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:
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:
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:
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!
Sponsored Content
Enhance your HTML skills with our in-depth tutorials and interactive quizzes.
Explore HTML Quiz