HTML li type-Eigenschaft
Beispiele
Verwenden Sie das type-Attribut in einer geordneten Liste und ungeordnete Liste:
<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>
Versuchen »
Browser-Unterstützung
Alle gängigen Browser unterstützen das type-Attribut.
Definition und Verwendung
HTML5 nicht unterstützt <li> type - Attribut. Verwenden Sie CSS statt.
In HTML 4.01, <li> type - Attribut obsolet .
type-Attribut gibt den Typ eines Aufzählungsliste des Listenelements.
Hinweise zur Kompatibilität
In HTML 4.01, ist <li> type-Attribut als veraltet. Verwenden Sie CSS statt.
CSS Syntax: <li style = "list-style-type: square">
In unserem CSS Tutorial können Sie weitere Informationen über die finden list-style-type - Eigenschaft Detail.
Grammatik
<li type="1|a|A|i|I|disc|circle|square">
Eigenschaft Wert
Geordnete Liste (<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) |
Ungeordnete Liste (<ul>):
值 | 描述 |
---|---|
disc | 默认。实心圆。 |
circle | 空心圆。 |
square | 实心方块。 |
HTML <li> -Tag