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.

HTML list code

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.

Ordered list default output

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.

Ordered list type attribute

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.

Ordered list start attribute

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.

Ordered list reversed attribute

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.

Unordered list default output

Description List

The description list element allows you to create a list of terms and their associated details.

Unordered list square bullets

Nested list

description list