HTML <li> tag

HTML <li> tag

The <li> tag defines a list item.

The <li> tag must be contained in a parent element: an ordered list (<ol>), an unordered list (<ul>), or a menu (<menu>).

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <ol> <li value="100">Brenden</li> <li>Eich</li> </ol> </body> </html>

Attributes

The following are the attributes of <li> tag. Also try Global attributes.

AttributeValueExplanation
valuenumberSpecifies the user defined attribute numbering from the specific list item. It works only with <ol> list

Deprecated Attributes

The following attribute should not be used in any case.

AttributeValueExplanation
type
  • a
  • A
  • 1
Specifies the different types of attribute can be used in the list.

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Meet the Author