Glubase - share your knowledge


All / Computers / Programming / HTML / XHTML





  • View Command

HTML / XHTML Reference

HTML / XHTML li definition

Browser support
IEFFOpSaf
FullFullFullFull

Type: block-level element

Syntax

<li> ... </li>

Description

Creates a list item in a list. The list can either be unordered list (ul), ordered list (ol), directory list (dir), menu list (menu).

Attributes

Attribute Description
compact Deprecated. Compact display.
type = style-information Deprecated. This attribute sets the style of a list item.
value = number Deprecated. Sets the number of the current list item.

Common attributes

See also

UL - unordered list

Example

[Try this example yourself]
<ul>
  <li>List item 1</li>
  <li>List item 2</li>
  <li>List item 3</li>
</ul>

Output

  • List item 1
  • List item 2
  • List item 3
  • Comments

No comments added.