List html is an important part of HTML that allows you to display items in a sequence, rather than using
Table of Contents
What is a list html?
Lists are an essential component of most web pages, and they are often used to display information in a well-formed and semantic manner. They are also useful for screen readers, which can help users with visual disabilities to understand your content more easily.
Types of list html
There are three types of list elements in HTML: unordered, ordered, and description. Each type has a specific purpose and meaning.
Unordered list – This is an easy-to-use form of HTML that displays items in a bullet format. The
Alternatively, you can style an unordered list to be a nested list or to display a custom marker. In addition, you can change the default layout from vertical to horizontal or use CSS to alter the list’s margin and padding properties.
What is a description list?
Description lists (formerly known as definition lists) are an HTML5-supported way to associate specific names and values with a description, similar to how entries appear in a dictionary or encyclopedia. This format is ideal for glossaries, list of terms or other name-value lists.
This is a good format to use when you need a list of terms and their descriptions, such as an ingredient list or an article author’s brief bio. It also works well for displaying competition winners and the years they won.
What is a nested list?
Nested lists are a common way to present content on a website. You can nest both
What is a nested ordered list?
A nested ordered list is a way to create a numbered list inside another numbered list. You can use
What is a nested unordered list?
A nested unordered list is an HTML element that represents a numbered list. It has an
If you want a nested ordered list that uses different schemes of numbers, you can use the CSS list-style-type property to change the numbering type for the nested order. For example, you could change the numbering to use roman numerals instead of decimal numbers if that makes more sense for your audience. Or, you could use the compact or reversed CSS property to set the nested order so that the last item in the list is smaller than its preceding items.