HTML <li>Tag

Advertisements


Description

The HTML <li> tag is used for specifying a list item in ordered, unordered, directory, and menu lists.

Example

<!DOCTYPE html>
<html>
<head>
<title>HTML li Tag</title>
</head>
<body>
<ul>
<li>ol - ordered list</li>
<li>ul - unordered list</li>
<li>dir - directory list</li>
<li>menu - menu list</li>
</ul>
</body>
</html>

This will produce following result:

  • ol - ordered list
  • ul - unordered list
  • dir - directory list
  • menu - menu list

Global Attributes

This tag supports all the global attributes described in - HTML Attribute Reference

Specific Attributes

The HTML <li> tag also supports following additional attributes:

AttributeValueDescription
typeA
a
I
i
1
disc
square
circle
Deprecated - Specifies the type of the list.
valuenumberSpecifies the value of a list item.

Event Attributes

This tag supports all the event attributes described in - HTML Events Reference

Browser Support

ChromeFirefoxIEOperaSafariAndroid
YesYesYesYesYesYes

html_tags_reference.htm

Advertisements