HTML list
HTML supports ordered, unordered, and definition lists:
HTML list
|
Ordered list
- The first list item
- Second list item
- Third list item
Unordered list
- List item
- List item
- List item
![]() |
Online example |
|---|
Unordered list
This example demonstrates an unordered list.
Ordered list
This example demonstrates an ordered list.
(More examples can be found at the bottom of this page.)
HTML Unordered Lists
An unordered list is a list of items marked with bold dots (typically small black circles).
Unordered lists use
-
tag
- Coffee
- Milk
- Coffee
- Milk
- tag.
List items are marked with numbers.
- Coffee
- Milk
Displayed in the browser as follows:
- Coffee
- Milk
HTML Custom Lists
A custom list is not just a list of items, but a combination of items and their descriptions.
A custom list begins with
-
tags. Each custom list item begins with
- . The definition of each custom list item begins with
-
.
- Coffee
- - black hot drink
- Milk
- - white cold drink
The browser displays as follows:
- Coffee
- - black hot drink
- Milk
- - white cold drink
Notes - Useful Tips
Tip: List items can contain paragraphs, line breaks, images, links, and other lists, etc.
More examples
Different types of ordered lists
This example demonstrates different types of ordered lists.Different types of unordered lists
This example demonstrates different types of unordered lists.Nested lists
This example demonstrates how to nest lists.Nested List 2
This example demonstrates a more complex nested list.Custom Lists
This example demonstrates a definition list.
HTML List Tags
tag Description Defines an ordered list Defines an unordered list Defines a list item Defines a list Custom list item Defines the description of a custom list item
The browser displays as follows:
HTML Ordered Lists
Similarly, an ordered list is also a list of items, with the list items marked by numbers. An ordered list begins with
-
tags. Each list item begins with
