HTML li type property
Examples
Use the type attribute in an ordered list and unordered list:
<ol>
<li>Coffee</li>
<li type="a">Tea</li>
<li>Milk</li>
</ol>
<ul>
<li>Coffee</li>
<li type="square">Tea</li>
<li>Milk</li>
</ul>
<li>Coffee</li>
<li type="a">Tea</li>
<li>Milk</li>
</ol>
<ul>
<li>Coffee</li>
<li type="square">Tea</li>
<li>Milk</li>
</ul>
try it"
Browser Support
All major browsers support the type attribute.
Definition and Usage
HTML5 does not support <li> type attribute. Use CSS instead.
In HTML 4.01, <li> type attribute obsolete .
type attribute specifies the type of a bulleted list of the list item.
Compatibility Notes
In HTML 4.01, <li> type attribute is deprecated. Use CSS instead.
CSS Syntax: <li style = "list-style-type: square">
In our CSS tutorial you can find more information about the list-style-type property detail.
grammar
<li type="1|a|A|i|I|disc|circle|square">
Property Value
Ordered list (<ol>):
值 | 描述 |
---|---|
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) |
Unordered list (<ul>):
值 | 描述 |
---|---|
disc | 默认。实心圆。 |
circle | 空心圆。 |
square | 实心方块。 |
HTML <li> tag