asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Language References > HTML Elements > LI Element

<LI Element | LI Object


Denotes one item in a list.HTML 2, 3.2, 4, 4.01, 5

HTML Syntax

Remarks

The LI element indicates a list item, which is usually preceded by a bullet, a number, or a letter. The LI element is used only inside list elements such as DIR ( directory ), MENU ( menu list ), OL ( ordered list ) and UL ( unordered list ).

Each LI element can contain other elements such as the P element.

The TYPE attribute values disc, circle, and square apply to unordered lists. Whereas the TYPE values 1, a, A, i, and I apply to ordered lists.

An <li> element’s end tag can be omitted if the <li> element is immediately followed by another <li> element or if there is no more content in the parent element.

Attributes

The <li> element supports the following attributes, in addition to global attributes common to all HTML elements.

AttributeValueDescription
valuenumberOnly for ol lists. Specifies the start value of a list item. The following list items will increment from that number

Example

The following shows how the LI element may be used.

<p>The LI element allows an author to:</p>
<ul>
   <li>Identify items in a numbered list
   <li>Identify items in an unordered list
   <li>Identify items in a directory list
   <li>Identify items in a menu
</ul>

which would render on a Web page as

The LI element allows an author to:

  • Identify items in a numbered list
  • Identify items in an unordered list
  • Identify items in a directory list  
  • Identify items in a menu
See Also

DIR   MENU   OL   UL   Using Lists in HTML



Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note