Main Index |
Top Of Tree |
Tag Index |
Tag History
- What is it?
- The List Item (LI) is only used as a sub-element of a list type.
DIR, MENU, OL, and UL all use it to mark a component of their structure.
The LI tag is the only content of these list structures. The closing
</li> element is optional, as it
is implied by the subsequent <li>
or end list tags.
- Attributes
Note: These attributes only apply when
UL and OL are the parent elements.
- Value
- 2 | 3
| 3.2 | IE1
| M | N1.1
- Required? No
- Description:
This attribute is used to indicate a number other than the
incremented value for the current List Item (LI) in an Ordered List
(OL.) It is thus possible to create a non-sequential list. Values are
automatically converted to the TYPE attribute, if present, of the
parent OL tag or current LI tag.
- Values: Given as a positive integer.
- Type
- 2 | 3
| 3.2 | IE1
| M | N1.1
- Required? No
- Description:
The Type attribute indicates different ordering label schemes to
be used instead of the default values for each element in a UL or OL.
The TYPE attribute to the LI tag is only applicable to UL and OL and
accepts values appropriate for each list type. When used at the LI
level, all subsequent list labels will carry the new TYPE scheme
unless set again by a later LI TYPE attribute.
- Values:
Ordered Lists (OL) values:
A [capital letters]
a [lower-case letters]
I [large roman numerals]
i [small roman numerals]
1 [default numbering scheme.]
Unordered Lists (UL) values:
disc [default solid bullet]
square [solid square]
circle [hollow bullet]
Style Sheet Attributes
[More on Cascading Style Sheets]
- Class
- 2 | 3
| 3.2 | IE3B1
| M | N4B2
- Required? No
- Description:
This represents an assigned semantic classification grouping(s) for the
current tag.
- Values:
Given as a comma separated list of alphanumeric characters. Class names
may contain spaces (multiple consecutive spaces treated as a single
space.)
- ID
- 2 | 3
| 3.2 | IE3B1
| M | N4B2
- Required? No
- Description:
This assigns an alpha-numeric identifier that is unique
to this tag instance. Style sheets may use this attribute to reference
the current instance of this tag. Hyperlinks may also use this identifier
to serve as a destination.
- Values:
An alphanumeric string - initial character must be a letter followed
by alphabetic characters, digits, "-" or "."
characters. The allowable set of alpha-characters is restricted to the
A-Z and a-z set.
- Style
- 2 | 3
| 3.2 | IE3B1
| M | N4B3
- Required? No
- Description:
This attribute is a text string that provides rendering style
information for the current tag.
- Values:
Please see the description of
inline styles for more
information on how to use this attribute and its
possible values.
- Example
- <ol>
<li>List item 1
<li
VALUE=5
TYPE="A">List item E
<li>List item 3
</ol>
- Parent Model
- <dir> |
<menu> |
<ol> |
<ul>
- LI Content Model: Dir/Menu
- %Text% |
%Anchors% |
%Virtual Formatting% |
%Physical Formatting% |
%Line Break Content% |
%Multimedia Content%
- LI Content Model: Ol/Ul
- %Text% |
%Anchors% |
%Virtual Formatting% |
%Physical Formatting% |
%Line Break Content% |
%Multimedia Content% |
%Block Content% |
<basefont>
Tips & Tricks
- Some people leverage on a behavioral defect in browsers whereby
embedding plain data in a list structure without LI tags will induce
indentation. This is illegal HTML and not recommended. Other legal
methods can be used to generally guarantee indentation.
- Changing the font attributes (size, color, etc.) of the contents
of a List Item usually does not affect the appearance of the listing
items (bullets)
- Lists are nestable.
- Even though the TYPE attribute for UL (and LI within UL) is listed
in the HTML 3.2 draft, it is still not widely supported.
- The VALUE attribute will have no effect within an unordered list
(UL) context.
Browser Peculiarities
- Internet Explorer, Mosaic and Netscape all produce the above
described indenting behavior for the mentioned invalid HTML.
- Only Netscape supports the TYPE attribute in application to unordered
lists (UL.)
Boring Copyright Stuff...