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>タグ