HTML <li> tag
When writing in HTML, the <li> tag is a block element used to designate a list item. It is found in each entry of both ordered (<ol>) and unordered lists (<ul>), as well as menus (<menu>). The following sections contain information about the <li> tag, including an example of it in use, as well as related attributes and browser compatibility.
<h3>Ordered List</h3> <ol>
<li>First numbered item</li>
<li>Second numbered item</li>
<li>Third numbered item</li>
</ol> <h3>Unordered List</h3> <ul>
<li>First bullet point</li>
<li>Second bullet point</li>
<li>Third bullet point</li>
- First numbered item
- Second numbered item
- Third numbered item
- First bullet point
- Second bullet point
- Third bullet point
Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair; all tags support standard attributes. The following table shows the only current, unique, HTML attribute for the <li> tag, as well as a description.
|value||Designates the value of a list item within an ordered list|
A deprecated attribute is one that may function currently but is not supported in going forward. While the attribute may work with the current version of HTML, it will eventually be phased out. It is better to avoid using these attributes to help future-proof your website.
|type||Designates which type of bullet to use in an unordered list|
|All versions||All versions||All version||All versions||All versions|