<ol type=""><li type="">
Browser |
|
---|---|
Type |
The type attribute of the OL element changes the numbering type.
The type attribute in the OL tag : Applied to all items in the list.
<ol type="A">
<li>first list item</li>
<li>second list item</li>
<li>third list item</li>
</ol>
The type attribute in the LI tag : Applied to one item.
<ol>
<li type="1">first list item</li>
<li type="A">second list item</li>
<li type="a">third list item</li>
<li type="I">fourth list item</li>
<li type="i">fifth list item</li>
</ol>
Attribute | Value | Explanation |
---|---|---|
type=" " | 1 | arabic numeral |
A | alphabet (capital letter) | |
a | alphabet (small letter) | |
I | roman numeral (capital letter) | |
i | roman numeral (small letter) |
The use of this attribute is deprecated. (Use CSS instead)
Example
<ol type="A">
<li>First list item</li>
<li>Second list item</li>
<li>Third list item</li>
</ol>
- Output
-
- First list item
- Second list item
- Third list item
<ol>
<li type="1">Arabic numeral</li>
<li type="A">Alphabet (capital letter)</li>
<li type="a">Alphabet (small letter)</li>
<li type="I">Roman numeral (capital letter)</li>
<li type="i">Roman numeral (small letter)</li>
</ol>
- Output
-
- Arabic numeral
- Alphabet (capital letter)
- Alphabet (small letter)
- Roman numeral (capital letter)
- Roman numeral (small letter)