ใช้แท็ก <ol> พร้อม attribute type="1" สำหรับรายการลำดับตัวเลข 1, 2, 3... (เป็นค่าเริ่มต้นแล้ว ไม่ต้องระบุก็ได้)
ค่าของ type attribute
| ค่า | รูปแบบ |
|---|---|
1 | 1, 2, 3... (ค่าเริ่มต้น) |
a | a, b, c... |
A | A, B, C... |
i | i, ii, iii... |
I | I, II, III... |
ตัวอย่าง
<!DOCTYPE html>
<html>
<head>
<title>World Cup Teams</title>
</head>
<body>
<h1>List of teams for World Cup</h1>
<ol type="1">
<li>India</li>
<li>Australia</li>
<li>South Africa</li>
<li>New Zealand</li>
<li>Pakistan</li>
<li>Sri Lanka</li>
<li>West Indies</li>
<li>Bangladesh</li>
</ol>
</body>
</html>
ผลลัพธ์
- India
- Australia
- South Africa
- New Zealand
- Pakistan
- Sri Lanka
- West Indies
- Bangladesh
Attribute เพิ่มเติม
start="5"- เริ่มนับจาก 5 แทน 1reversed- นับถอยหลัง (HTML5)