ol tag
ul tag
dd tag
dl tag
dt tag
dir tag
menu tag
TAG: li
<li> ... </li>
Available in versions: 2.0, 3.2, 4.0
Browser compatibility: Explorer 4, 5 Netscape 4, 6
The
<li>
tag is used to list an item in a list. This tag is required for both the ordered list
ol
tag and the unordered list
ul
tag. (It is also required for two deprecated tags, the
dir
directory list and the
menu
list.)
For ordered and unordered lists, there are essentially no restrictions as to the text that may be placed in a list, such as length. (However, directory and menu lists, by definition, are listings of short items.)
In an unordered list, each item is preceded by a bullet, such as . In an ordered list, each item is labeled with a number, letter, or Roman numeral that increments with each following item.
The ending tag is optional. However, it is recommended that it be included.
Core Attributes
class
dir
id
lang
onclick
ondblclick
onkeydown
onkeypress
onkeyup
onmousedown
onmousemove
onmouseout
onmouseover
onmouseup
style
title
Attributes
type
deprecated 4.0
The
type
attribute determines the characters used to order the list. For an ordered list, the permitted values are:
1
for Arabic numbers;
I
or
i
for upper or lower case Roman numerals; and
A
or
a
for upper or lower case alphabetic characters. For an unordered list, the permitted values are a
circle, disc,
and
square
. It is deprecated effective with version 4.0.
value
deprecated 4.0
The
value
attribute is used to set the order value that precedes a specific item in an ordered list. It is deprecated effective with version 4.0.
This is an unordered list.
Code:
Three Major Types Of Lists:
<ul>
<li> Definition List
<ul type="square">
<li> dd tag
<li> dl tag
<li> dt tag
</ul>
<li> Ordered List
<ul type="circle">
<li> ol tag
<li> li tag
</ul>
<li> Unordered List
<ul type="disc">
<li> ul tag
<li> li tag
</ul>
</ul>
Output:
Three Major Types Of Lists:
Definition List
dd tag
dl tag
dt tag
Ordered List
ol tag
li tag
Unordered List
ul tag
li tag
This is an ordered list.
Code:
Three Major Types Of Lists:
<ol>
<li> Definition List
<ol type="A" start="5">
<li> dd tag
<li> dl tag
<li> dt tag
</ol>
<li> Ordered List
<ol type="i">
<li> ol tag
<li> li tag
</ol>
<li> Unordered List
<ol type="1">
<li> ul tag
<li> li tag
</ol>
</ol>
Output:
Three Major Types Of Lists:
Definition List
dd tag
dl tag
dt tag
Ordered List
ol tag
li tag
Unordered List
ul tag
li tag
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information