
Html list items are used to create ordered or unordered lists in HTML.
There are two main types of list items: ordered and unordered. Ordered list items are denoted by the element, while unordered list items are denoted by the element.
A list item can be created using the element, which is used to define a single item in a list.
Additional reading: The Html Canvas Element Is Used to
List Types
List types in HTML are used to create ordered and unordered lists. An unordered list is a list of related items whose order does not matter.
There are two main types of unordered lists: the tag, which creates an unordered list, and the tag, which adds list items to the unordered list. For example, PaperPencilsScissors creates an unordered list with paper, pencils, and scissors as list items.
Unordered lists can be customized using CSS styles, such as changing the bullet point style to a circle, disc, or square. The list-style property has four main values: none, circle, disc, and square. For instance, list-style: none removes the bullet points, while list-style: circle adds a hollow circle as the bullet point.
Expand your knowledge: Html for Bullet Points

Ordered lists, on the other hand, are lists of items that are in a specific order. They are marked with numbers by default, but can be changed to alphabets or roman numbers using the type attribute or the CSS list-style-type property. The type attribute can be used to define the item numbering type, such as type="1" for numbers, type="A" for uppercase letters, or type="i" for lowercase letters.
Here are the different list style type values that can be used in HTML:
You can choose from these list style type values to customize the appearance of your ordered lists in HTML.
List Elements
List Elements are a crucial part of HTML, and they come in two main forms: unordered and ordered lists.
You can create an unordered list using the tag, which is the recommended way to go, as it's more flexible and widely supported. The tag creates an unordered list, and list items are added with nested tags.
A user agent will render a DIR or MENU list exactly as a UL list, so it's best to use UL instead of these deprecated elements. The DIR element was designed for multicolumn directory lists, and the MENU element was designed for single column menu lists.
Here are the main list elements in HTML:
- for unordered lists
- for ordered lists
- for list items
DL, DT, DD Elements
Definition lists are a type of list that consists of two parts: a term and a description. They vary slightly from other types of lists.
The term in a definition list is given by the DT element, which is restricted to inline content. This means it can't contain block-level content.
The description in a definition list is given with a DD element, which contains block-level content. This allows for more detailed explanations.
Definition lists can have multiple terms and descriptions, making them useful for presenting complex information in a clear and organized way. They help to break down information into smaller, more manageable chunks.
On a similar theme: Styling Html Lists
Dir and Menu Elements
The DIR and MENU elements are deprecated, which means they're no longer recommended for use.
You might be wondering why, but the truth is, a user agent will render a DIR or MENU list exactly as a UL list.
In practice, this means you can just use UL instead of these elements.
For more insights, see: Ul Tag in Html
The DIR element was designed for creating multicolumn directory lists, but it's not necessary to use it when you can just use UL.
The MENU element was designed for single column menu lists, but again, UL will do the job just fine.
Both DIR and MENU elements have the same structure as UL, just different rendering.
We strongly recommend using UL instead of these elements, and for good reason – it's simpler and more effective.
Consider reading: Can You Do Freelancing with Just Html and Css
List Rendering
List rendering is a crucial aspect of HTML lists. Visual user agents generally indent nested lists with respect to the current level of nesting.
The type attribute in the UL element specifies rendering options for visual user agents, with possible values being disc, square, and circle. These values are case-insensitive, and user agents should attempt to present a "disc" as a small filled-in circle, a "circle" as a small circle outline, and a "square" as a small square outline.
Check this out: Visual Studio Html
For the OL element, possible values for the type attribute are summarized in the table below (they are case-sensitive):
The type attribute is deprecated and list styles should be handled through style sheets.
Visual Rendering
Visual rendering of lists can be quite interesting. Visual user agents generally indent nested lists with respect to the current level of nesting.
For both ordered and unordered lists, the type attribute specifies rendering options for visual user agents. This attribute is case-insensitive for unordered lists, where possible values are disc, square, and circle.
A graphical user agent might render these values as a small filled-in circle for "disc", a small circle outline for "circle", and a small square outline for "square".
The type attribute for ordered lists is a bit more complex. Here are the possible values for the type attribute of an OL element, summarized in a table:
Note that the type attribute is deprecated and list styles should be handled through style sheets.
List Styling

List styling is a crucial aspect of making your HTML list items stand out. You can change the default style of a list item marker using CSS.
The list-style-type property is used to set the content of a list item marker. This property can be added to either unordered or ordered lists, allowing you to use a numeric list item marker on an unordered list and a nonnumeric marker on an ordered list.
Here are the available values for the list-style-type property: List Style Type ValueContentnoneNo list itemdiscA filled circlecircleA hollow circlesquareA filled squaredecimalDecimal numbersdecimal-leading-zeroDecimal numbers padded by initial zeroslower-romanLowercase roman numeralsupper-romanUppercase roman numeralslower-greekLowercase classical Greeklower-alpha / lower-latinLowercase ASCII lettersupper-alpha / upper-latinUppercase ASCII lettersarmenianTraditional Armenian numberinggeorgianTraditional Georgian numbering
The default position of the list item marker is to the left of the content within the element, described as outside. You can change this default value to inside using the list-style-position property.
Take a look at this: Default Html
Styling Basics

List item styling is a crucial aspect of list styling, and it's surprisingly easy to customize. By default, unordered lists use solid dots as list item markers, while ordered lists use numbers.
You can adjust the style and position of list item markers using CSS. This means you can change the default bullet points on unordered lists to something more visually appealing.
The list-style-type property is used to set the content of a list item marker. This property can be applied to either unordered or ordered lists, and it's not limited to numeric markers. You can use a numeric list item marker on an unordered list and a non-numeric marker on an ordered list.
The list-style-type property has a range of values, from squares and decimal numbers to Armenian numbering. Here's a breakdown of the available values:
To create an unordered list in HTML, you use the tag and add tags within it. This will give you the default style of bullet points.
By using the list-style-type property, you can customize the list item markers to suit your needs.
Floating and Displaying
Displaying lists horizontally can be achieved by changing the display property value of elements to inline or inline-block. This method places all the elements within a single line, with a single space between each list item.
To remove the spaces between each list item, you can use the techniques discussed in Lesson 5, "Positioning Content." The inline-block property value is often preferred over inline because it allows for easy addition of vertical margins and other spacing to the elements.
The inline-block property value also retains the list item marker, whereas the inline property value removes it. If the list item marker is necessary, floating each element is a better option.
Floating each element horizontally aligns them directly next to each other without any space between them. To prevent the list item marker from being displayed on top of other elements, a horizontal margin or padding should be added.
Here are some common display property values for elements:
List Creation
Creating lists in HTML is a fundamental skill that can make your web pages more engaging and user-friendly.
You can create an unordered list using the tag, which creates a list of related items whose order does not matter. Each item within an unordered list is individually marked up using the list item element,.
For example, if you want to list some office supplies, you can use the following code: PaperPencilsScissors.
Most browsers add a vertical margin and left padding to the element and precede each element with a solid dot by default.
You can change the list item marker using CSS.
To create an ordered list, you can use the tag, which is short for ordered list. Inside each of the ordered list elements and , you have to define the list items using the tag.
Here's an example of an ordered list with list items numbered starting from 1: studydesignPurpose, planning, or intention that exists or is thought to exist behind an action, fact, or material object.
The and tags are the basic building blocks of lists in HTML, and understanding how to use them is essential for creating engaging and informative content.
Related reading: How to Give an Html Attribute Multiple Items
List Attributes
The start attribute defines the number from which an ordered list should start, and it accepts only integer values. By default, ordered lists start at 1, but you can specify a value to start the list from a specific number using the start attribute.
You can use the start attribute on the element to identify which number an ordered list should begin counting from. For example, if you want to start a list with the number 30, you can specify the number 30 as the value of the start attribute.
The start attribute is useful when you need to create a list that starts from a specific number, such as 30. You can use it to create a list that meets your specific needs.
Explore further: List with Numbers Html
List Item Attributes
You can change the value of a list item within an ordered list using the value attribute. This attribute can be used on an individual element.
The value attribute can be used to change the numbering of a list item. For example, if the second list item has a value attribute value of 9, the number on that list item marker will appear as if it is the ninth item.
Broaden your view: Is Html Still Used
The value attribute can be used in combination with the recalculation of list item numbers. This means that all subsequent list items will be numbered upwards from the value specified in the attribute.
Here's an example of how the value attribute can be used:
Turn right on W Diversey Pkwy
By using the value attribute, you can create customized list item numbers that meet your specific needs.
The list item marker can also be changed using CSS. Most browsers add a vertical margin and left padding to the element and precede each element with a solid dot by default. However, you can use CSS to change the style of the list item marker.
Here's an example of how to change the list item marker:
Item 1Item 2Item 3
By using the list-style-type property in CSS, you can change the style of the list item marker to suit your needs.
See what others are reading: Set up Html Mail Using Word
Type Attribute
The type attribute is a crucial part of ordered lists in HTML. It determines the type of numbering used for the list items.
You can use the type attribute to specify the numbering type, and there are several options available. For example, you can use type="1" to number the list items with numbers, which is the default.
Here are some common types of numbering you can use:
Using the type attribute can make your lists more visually appealing and easier to read. For instance, using uppercase letters can make your list stand out, while using Roman numerals can add a touch of elegance.
Readers also liked: Using Oembed in Base Html
Start Attribute
The start attribute is a powerful tool in HTML lists that allows you to specify the starting number of an ordered list.
By default, ordered lists start at 1, but with the start attribute, you can start the list from any number you want, such as 30 or another number.
The start attribute accepts only integer values, even though ordered lists may use different numbering systems, such as roman numerals.
To use the start attribute, you simply add the start attribute to the element and specify the number you want the list to start from.
For example, if you want the list to start from 30, you can use the following code: .
This is useful when you need to insert a list in the middle of a document or when you want to create a list that starts from a specific number for a particular reason.
Here are some examples of how to use the start attribute in HTML lists:
Remember, the start attribute can be used to start an ordered list from any number you want, making it a flexible and useful tool in HTML lists.
You might like: Start in Html
List Markers
List Markers are a crucial part of creating visually appealing and user-friendly lists in HTML.
You can use the CSS list-style-type property to set the style of the item markers, which can be a disc, circle, square, or even none.
The list-style-type property comes with a handful of different values, including disc, circle, square, decimal, and more. These values can be added to either unordered or ordered lists.
Here are the main values of the list-style property that help us customize the bullet point style of an unordered list:
You can also use an image as a list item marker by placing a background image on each element within a list and removing any default list-style-type property value.
In addition to the built-in markers, you can create custom image markers using CSS, specifically with the list-style-image property.
Worth a look: Html Class Property
List Nesting
List nesting is a powerful feature that allows you to create complex document structures in HTML.
To create a nested list, place an unordered or ordered list inside a parent list item element. This is done by wrapping the nested list in a tag. For example, Paper
Pencils
Scissors.
You can nest lists indefinitely, but it's essential to know where to begin and end each list and list item. The only element that can reside directly within the and elements is the element.
Here's a breakdown of the nesting rules:
To nest a list, start a new list instead of closing a list item. Once the nested list is complete, close the wrapping list item and continue with the original list.
For instance, in the following example, an unordered list is nested within an ordered list:1
2
Discover more: Html Nested Forms
3
4
5
6
7
8
9
10
11
12
13
14
15Walk the dogFold laundry
Go to the grocery and buy:
- Milk
- Bread
- Cheese
- Mow the lawn
- Make dinner
As you nest lists, their list item markers will change according to the level of nesting. This means that the list item markers will change from solid discs to hollow circles, and so on.
Take a look at this: B Tag in Html
List Miscellaneous
In HTML, we can create an ordered list using the tag, which stands for an ordered list. The list items inside the ordered list elements and are defined using the tag.
To create an unordered list, we use the tag, which comes with the default style of bullet points. Each list item inside the unordered list (ul) is preceded by a black dot.
We can define the list items inside both ordered and unordered lists using the tag. This means the syntax for creating list items is the same for both types of lists.
Here's a quick rundown of the tags we've covered so far:
- for an ordered list
- for an unordered list
* for a list item
Frequently Asked Questions
What is the list item tag in HTML?
The
What is </ul?
The tag is used to close an unordered list in HTML, indicating the end of a list where the order of items doesn't matter. It's a crucial tag for creating clean and organized lists in web development.
Featured Images: pexels.com

