HTML Ordered Lists
The HTML
- tag defines an ordered list. An
ordered list can be numerical or alphabetical.
- Item
- Item
- Item
- Item
- First item
- Second item
- Third item
- Fourth item
- tag and will be marked as numbers, lowercase letters uppercase letters, roman letters, etc. The default numbers for list items.
For creating an ordered list with numbers, use the
- tag attribute type. This attribute will assign the value number i.e.
- element, palpable content.
- , and elements.
- Numeric Number [1, 2, 3]
- Capital Roman Number [I II III]
- Small Romal Number [i ii iii]
- Capital Alphabet [A B C]
- Small Alphabet [a b c]
- to create ordered list numbered with numbers.
- : The Ordered List element
The
Content categories Flow content, and if the - element's children include at least one
Permitted content Zero or more Tag omission None, both the starting and ending tag are mandatory. Permitted parents Any element that accepts flow content. Implicit ARIA role list Permitted ARIA roles directory, group, listbox, menu, menubar, none, presentation, radiogroup, tablist, toolbar, tree DOM interface HTMLOListElement HTML Lists
In this tutorial you will learn how to create different types of lists in HTML.
HTML Ordered List | HTML Numbered List
HTML Ordered List or Numbered List displays elements in numbered format. The HTML ol tag is used for ordered list. We can use ordered list to represent items either in numerical order format or alphabetical order format, or any format where an order is emphasized. There can be different types of numbered list:
To represent different ordered lists, there are 5 types of attributes in
- tag.
TypeDescription Type "1" This is the default type. In this type, the list items are numbered with numbers. Type "I" In this type, the list items are numbered with upper case roman numbers. Type "i" In this type, the list items are numbered with lower case roman numbers. Type "A" In this type, the list items are numbered with upper case letters. Type "a" In this type, the list items are numbered with lower case letters. Creating Lists
HTML Lists
HTML lists allow web developers to group a set of related items in lists.
Example
An unordered HTML list:
An ordered HTML list:
How to create an ordered list with list items numbered with numbers in HTML?
To create ordered list in HTML, use the
- tag. Ordered list starts with the
- tag. The list item starts with the