Latest web development tutorials

HTML ol type property

HTML ol tag Reference Manual HTML <ol> tag

Examples

An ordered list with uppercase Roman numerals:

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

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the type attribute.


Definition and Usage

type attribute specifies the type of mark (letters or numbers) list that you want to use.


Differences between HTML 4.01 and HTML5

In HTML5, no longer use <ol> element type attribute opposition.


grammar

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

Property Value

描述
1 默认。十进制数字 (1, 2, 3, 4)。
a 字母顺序的有序列表,小写 (a, b, c, d)。
A 字母顺序的有序列表,大写 (A, B, C, D)。
i 罗马数字,小写 (i, ii, iii, iv)。
I 罗马数字,大写 (I, II, III, IV)。


HTML ol tag Reference Manual HTML <ol> tag