HTML <li> tag
Examples
HTML lists two examples: an ordered list (<ol>) and an unordered list (<ul>):
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
try it"
(See bottom of this page for more examples)
Browser Support
At present, most major browsers support <li> tag.
Tag definitions and instructions
<Li> tag definition list item.
<li> tag can be used in an ordered list ( <OL> ), unordered list ( <UL> ) and menu list ( <the MENU> ) in.
Differences between HTML 4.01 and HTML5
"Type" attribute has been deprecated in HTML 4.01. HTML5 does not support this property.
"Value" attribute has been deprecated in HTML 4.01. HTML5 does not support this property.
Tips and Notes
Tip: Use CSS to define the type of list and list items.
Attributes
属性 | 值 | 描述 |
---|---|---|
type | 1 A a I i disc square circle |
HTML5 不支持该属性。HTML 4.01 已废弃该属性。 不赞成使用。请使用样式取代它。 规定使用哪种项目符号。 |
value | number | 不赞成使用。请使用样式取代它。 规定列表项目的数字。 |
Global Properties
<li> tag supports the global attributes, view complete the property sheet HTML Global Attributes .
Event Properties
<li> tag supports all HTML event attributes .
Online examples
A nested list
List within the list.
Also a nested list
More complicated nested list.
related articles
HTML Tutorial: HTML list