ข้อมูลอ้างอิงHTML

HTML โดยตัวอักษร HTML ตามหมวดหมู่ รองรับ HTML Browser แอตทริบิวต์ HTML HTML Global Attributes เหตุการณ์ HTML HTML สี HTML Canvas HTML เสียง/วิดีโอ ชุดอักขระ HTML HTML Doctypes การเข้ารหัส URL HTML รหัสภาษา HTML รหัสประเทศ HTML ข้อความ HTTP วิธี HTTP ตัวแปลง PX เป็น EM แป้นพิมพ์ลัด


HTML <ol> ประเภทแอตทริบิวต์

❮ แท็ก HTML <ol>

ตัวอย่าง

รายการสั่งซื้อที่มีตัวเลขโรมันตัวพิมพ์ใหญ่:

<ol type="I">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>

ตัวอย่าง "ลองใช้เอง" เพิ่มเติมด้านล่าง


ความหมายและการใช้งาน

แอตทริบิวต์typeระบุชนิดของเครื่องหมายที่จะใช้ในรายการ (ตัวอักษรหรือตัวเลข)

เคล็ดลับ:คุณสมบัติ CSS list-style-type มีประเภทมากกว่าtypeแอตทริบิวต์ (ดูตัวอย่างด้านล่าง)


รองรับเบราว์เซอร์

Attribute
type Yes Yes Yes Yes Yes

ไวยากรณ์

<ol type="1|a|A|i|I">

ค่าแอตทริบิวต์

Value Description
1 Default. Decimal numbers (1, 2, 3, 4)
a Alphabetically ordered list, lowercase (a, b, c, d)
A Alphabetically ordered list, uppercase (A, B, C, D)
i Roman numbers, lowercase (i, ii, iii, iv)
I Roman numbers, uppercase (I, II, III, IV)

ตัวอย่างเพิ่มเติม

ตัวอย่าง

แสดงรายการประเภทต่างๆ ทั้งหมดที่มีใน CSS:

<style>
ol.a {list-style-type: armenian;}
ol.b {list-style-type: cjk-ideographic;}
ol.c {list-style-type: decimal;}
ol.d {list-style-type: decimal-leading-zero;}
ol.e {list-style-type: georgian;}
ol.f {list-style-type: hebrew;}
ol.g {list-style-type: hiragana;}
ol.h {list-style-type: hiragana-iroha;}
ol.i {list-style-type: katakana;}
ol.j {list-style-type: katakana-iroha;}
ol.k {list-style-type: lower-alpha;}
ol.l {list-style-type: lower-greek;}
ol.m {list-style-type: lower-latin;}
ol.n {list-style-type: lower-roman;}
ol.o {list-style-type: upper-alpha;}
ol.p {list-style-type: upper-latin;}
ol.q {list-style-type: upper-roman;}
ol.r {list-style-type: none;}
ol.s {list-style-type: inherit;}
</style>

❮ แท็ก HTML <ol>