There are three main types of HTML lists, each serving a specific structural purpose in web development.
Ordered List
The HTML ordered list allows you to group a list of related items in a specific order.
To create a new ordered list, youll need to use thetag.
Thetaggroups, and contains,tags.
Each list element (tag) will contain a specific item in the list.
Thetype attributegives you the power to decide what element will order your list.
Thestart attributeallows you to start ordering from any position using an integer value.
The code above renders the following view:
Thereversed attributeallows you to reverse the order of the list.
It accepts a boolean value, and its default value is false.
This code produces the following output in the online window:
2.
Unordered List
The unordered list lets you group related items whose order is not significant.
By default, a online window uses a bullet point to label each item.
In the past, you could use atypeattribute to set the bullet style of an unordered list.
However, the unordered list key in attribute is nowa deprecated attribute.
The recommended alternative for unordered list styling is theCSS list-style-pop in property.
Nested Lists
A nested list is a list element that is part of another list.
you’re free to create a nested list using a combination of ordered and/or unordered list elements.
These structures can represent more complex hierarchies.
Description List
The description list element allows you to create a list of terms and their associated details.