files/en-us/web/html/reference/elements/li/index.md
The <li> HTML element is used to represent an item in a list. It must be contained in a parent element: an ordered list ({{HTMLElement("ol")}}), an unordered list ({{HTMLElement("ul")}}), or a menu ({{HTMLElement("menu")}}). In menus and unordered lists, list items are usually displayed using bullet points. In ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter.
{{InteractiveExample("HTML Demo: <li>", "tabbed-shorter")}}
<p>Apollo astronauts:</p>
<ul>
<li>Neil Armstrong</li>
<li>Alan Bean</li>
<li>Peter Conrad</li>
<li>Edgar Mitchell</li>
<li>Alan Shepard</li>
</ul>
p,
li {
font:
1rem "Fira Sans",
sans-serif;
}
p {
font-weight: bold;
}
This element includes the global attributes.
value
type {{Deprecated_inline}}
: This character attribute indicates the numbering type:
a: lowercase lettersA: uppercase lettersi: lowercase Roman numeralsI: uppercase Roman numerals1: numbersThis type overrides the one used by its parent {{HTMLElement("ol")}} element, if any.
[!NOTE] This attribute has been deprecated; use the CSS {{cssxref("list-style-type")}} property instead.
For more detailed examples, see the {{htmlelement("ol")}} and {{htmlelement("ul")}} pages.
<ol>
<li>first item</li>
<li>second item</li>
<li>third item</li>
</ol>
{{EmbedLiveSample("Ordered_list")}}
<ol type="I">
<li value="3">third item</li>
<li>fourth item</li>
<li>fifth item</li>
</ol>
{{EmbedLiveSample("Ordered_list_with_a_custom_value")}}
<ul>
<li>first item</li>
<li>second item</li>
<li>third item</li>
</ul>
{{EmbedLiveSample("Unordered_list")}}
{{Specifications}}
{{Compat}}
<li> element: