Easy Tutorial
❮ Canvas Beziercurveto Att Option Value ❯

HTML <li> Tag

Example

HTML examples of two lists: an ordered list (<ol>) and an unordered list (<ul>):


Browser Support

Most major browsers currently support the <li> tag.


Tag Definition and Usage

The <li> tag defines a list item.

The <li> tag is used within ordered lists (<ol>), unordered lists (<ul>), and menu lists (<menu>).


Differences Between HTML 4.01 and HTML5

The "type" attribute was deprecated in HTML 4.01. HTML5 does not support this attribute.

The "value" attribute was deprecated in HTML 4.01. HTML5 does not support this attribute.


Tips and Notes

Tip: Use CSS to define the type of lists and list items.


Attributes

Attribute Value Description
type 1 <br>A <br>a <br>I <br>i <br>disc <br>square <br>circle HTML5 does not support this attribute. Deprecated in HTML 4.01. Not recommended. Use styles instead. <br>Specifies the type of bullet point.
value number Not recommended. Use styles instead. <br>Specifies the number of the list item.

Global Attributes

The <li> tag supports global attributes. View the complete list of HTML Global Attributes.


Event Attributes

The <li> tag supports all HTML Event Attributes.


Online Examples

A Nested List

Another Nested List


Related Articles

HTML Tutorial: HTML Lists

❮ Canvas Beziercurveto Att Option Value ❯