Reference · Beginner
The ul, ol, and li elements
Represent unordered groups and meaningful sequences with list items that preserve count, order, and nesting relationships.
- Author
- Editorial team
- Reviewer
- Publication review pending
- Review tier
- annual
Definition
ul represents an unordered list, ol an intentionally ordered list, and li
one item in either list.
Syntax
<ul>
<li>Semantic HTML</li>
<li>Responsive CSS</li>
<li>Minimal JavaScript</li>
</ul>
Context and attributes
List containers accept list items as their children. An ordered list can use
start, reversed, or item value when numbering carries real meaning.
Accessibility
List semantics expose grouping and item count. If CSS removes markers, test that the list is still announced correctly in supported assistive technology.
Common misuse
Do not create visual bullet rows with repeated characters and generic containers. A nested list belongs inside the list item it expands.