Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML5 <li> tag


May 03, 2021 HTML5


Table of contents


HTML5 labels are used to represent items in a list in a document, and in the following example, we used the labels in the ordered and out-of-order lists, respectively.

HTML two list examples: an ordered list (-lt;ol>) and a sequenceless table (?lt;ul?gt;):

<ol>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>

<ul>
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ul> 
Try it out . . .
(See more examples at the bottom of this page)

Browser support

HTML5 <li> tag HTML5 <li> tag HTML5 <li> tag HTML5 <li> tag HTML5 <li> tag

Most mainstream browsers currently support the hashtag.


Label definition and instructions for use

The label defines the list item.

Labels are available in an ordered list (slt;ol>), a sequence-free table (slt;ul> and a menu list ( slt;menu?gt;


The difference between HTML 4.01 and HTML5

The "type" property has been discarded in HTML 4.01. HTML5 does not support this property.

The "value" property has been discarded in HTML 4.01. HTML5 does not support this property.


Tips and comments

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


Property

Property Value Describe
Type (abandoned) 1
A
A


disc
square
circle
HTML5 does not support this property. H TML 4.01 has discarded the property. /b10>Not in favor of use. Use the CSS list-style-type property instead to specify which bullet to use.
value number Not in favor of use. U se styles instead of styles. Specifies the number of items in the list.


Global properties

The label supports global properties and views the full property sheet HTML global properties.


The event property

The label supports all HTML event properties.


HTML5 <li> tag

Online instance

A nested list
The list within the list.

Another nested list
More complex nested lists.


Related articles

HTML tutorial: HTML list