HTML <li> Tag

If this site has been useful, we’d love your support! Running this site takes time and resources, and every small contribution helps us keep creating valuable content. Consider buying us a coffee to keep things going strong!

Description

The <li> HTML tag, short for "list item," is used to define an item in a list. It is typically used within ordered lists <ol> or unordered lists <ul>. Each <li> element represents a single item within the list, and the content inside the <li> tags can include text, images, links, or other HTML elements. When rendered in a web browser, list items are typically displayed with a bullet point (for unordered lists) or a sequential number or letter (for ordered lists) to indicate their position within the list. The <li> tag is a fundamental element for structuring and presenting information in a list format on web pages.

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

The following table will show you the current browser support for the HTML <li> tag.

Desktop
Edge Chrome Firefox Opera Safari
121112.13
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
18412.1114.4

Last updated by CSSPortal on: 30th March 2024