Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project









TAG:  li

<li> ... </li>
 
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.
 
For ordered and unordered lists, there are essentially no restrictions as to the text that may be placed in a list, such as length.
 
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 separate closing tag is mandatory.
 
Attributes and Events
 
class    dir    id    lang    onclick    ondblclick    onkeydown    onkeypress    onkeyup    onmousedown    onmousemove    onmouseout    onmouseover    onmouseup    style    title
 
This is an unordered list.
 
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>DevGuru XHTML li Tag Example</title>
</head>
<body>
Three Major Types Of Lists:
<ul>
<li> Definition List</li>
<ul style="list-style-type: square;">
<li> dd tag</li>
<li> dl tag</li>
<li> dt tag</li>
</ul>
<li> Ordered List</li>
<ul style="list-style-type: circle;">
<li> ol tag</li>
<li> li tag</li>
</ul>
<li> Unordered List
<ul style="list-style-type: disc;">
<li> ul tag</li>
<li> li tag</li>
</ul>
</ul>
</body>
</html>

 
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:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>DevGuru XHTML li Tag Example</title>
</head>
<body>
Three Major Types Of Lists:
<ol>
<li> Definition List</li>
<ol style="list-style-type: lower-alpha;">
<li> dd tag</li>
<li> dl tag</li>
<li> dt tag</li>
</ol>
<li> Ordered List</li>
<ol >
<li> ol tag</li>
<li> li tag</li>
</ol>
<li> Unordered List
<ol style="list-style-type: upper-roman;">
<li> ul tag</li>
<li> li tag</li>
</ol>
</ol>
</body>
</html>

 
Output:
Three Major Types Of Lists:
  1. Definition List
    1. dd tag
    2. dl tag
    3. dt tag
  2. Ordered List
    1. ol tag
    2. li tag
  3. Unordered List
    1. ul tag
    2. li tag


 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information