W3 3.2y
4.0y
NS 3.0y
4.0y
IE 3.0y
4.0y
TV 1.2y
2.1y

<LI>...[</LI>]

Description

Identifies an item in a list. You can use this element inside the lists DIR, MENU, OL and UL.

DTD

<!ELEMENT LI - O (%flow;)*             -- list item --><!ATTLIST LI
  %attrs;                              -- %coreattrs, %i18n, %events --
  >
from the HTML 4.0 DTD, "Copyright © W3C, (MIT, INRIA, Keio). All Rights Reserved."

Attributes

Core attributes: class id style title
Internationalization attributes: dir lang
Events: onclick ondblclick onmousedown onmouseup onmouseover onmousemove onmouseout onkeypress onkeydown onkeyup

W3 3.2y
4.0d
NS 3.0y
4.0y
IE 3.0y
4.0y
TV 1.2y
2.1y
TYPE
Depending on the sort of list you can set how each new item should be identified. For an ordered list these values are allowed:

Value Description
A Use large letters as the indicator for an item.
a Use small letters as the indicator for an item.
I Use large roman numerals as the indicator for an item.
i Use small roman numerals as the indicator for an item.
1 Use numbers as the indicator for an item.

For unordered lists, menu lists and directory lists these values are allowed:

Value Description
CIRCLE Show an open circle in front of the item.
DISC Show a filled circle in front of the item.
SQUARE Show a filled square in front of the item.


W3 3.2y
4.0d
NS 3.0y
4.0y
IE 3.0y
4.0y
TV 1.2y
2.1y
VALUE
This attribute is used to change the automatic count that is used within the list.

Examples

Source
Here's a simple list :
<MENU>
<LI type="circle">The first item in the list.
<LI type="square">The second item.
<LI type="disc">And the last item.
</MENU>
 
Result
Here's a simple list :
  • The first item in the list.
  • The second item.
  • And the last item.
  •  
    Source
    Here's a list with an alternate count :
    <OL type="i">
    <LI>The first item in the list.
    <LI value="4">And the second item.
    </OL>
     
    Result
    Here's a list with an alternate count :
    1. The first item in the list.
    2. And the second item.
    Statistics