HTML <li> Tag

Description

The <li> HTML element defines an individual list item. The external <ul> or <ol> element sets the type of the list - bulleted or numbered.

Properties

Permitted Parents
An <ul>, <ol>, or <menu> element. Though not a conforming usage, the obsolete <dir> can also be a parent
Content
Block, inline and text
Start/End Tags
Start tag: required, End tag: required

Example

<ul>
<li>Mouse</li>
<li>Cat</li>
<li>Dog</li>
</ul>

Attributes

Attribute Definition
type Specifies the type of bullet. Possible values:
  • A
  • a
  • I
  • i
  • 1
  • disc
  • square
  • circle
-Deprecated- Use CSS Instead
value Specifies the number of the current list item.
-Deprecated-

Global Attributes

The <li> tag also supports the Global Attributes in HTML5

Event Attributes

The <li> tag also supports the Event Attributes in HTML5

Browser Support

Desktop
Explorer Edge Chrome Firefox Opera Safari
YesYesYes1YesYes
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
YesYes4YesYesYes

Last updated by CSSPortal on: 6th December 2019