HTML Lists
An ordered list is defined by the HTML <ol> tag. You can have an alphabetical or numeric ordered list.
The <ol> tag indicates that the list is sorted. The <li> tag comes first on every list item.
By default, numbers will be used to indicate the list items:
- Water
- Ice
- Air
The type attribute of the <ol> tag, defines the type of the list item marker:
| Type | Description |
|---|---|
| type="1" | The list items will be numbered with numbers (default) |
| type="A" | The list items will be numbered with uppercase letters |
| type="a" | The list items will be numbered with lowercase letters |
| type="I" | The list items will be numbered with uppercase roman numbers |
| type="i" | The list items will be numbered with lowercase roman numbers |
- Water
- Ice
- Air
- Water
- Ice
- Air
- Water
- Ice
- Air
- Water
- Ice
- Air
- Water
- Ice
- Air
An ordered list will always begin counting from 1 by default. The start attribute can be used to begin counting from a given number:
- Water
- Ice
- Air
Lists can be nested (list inside list):
- Coffee
- Tea
- Hot tea
- Cold tea
- Milk
The <ol> tag indicates that the list is sorted. The <li> tag comes first on every list item.
By default, numbers will be used to indicate the list items:
- Water
- Ice
- Air
CodingAsk.com is designed for learning and practice. Examples may be made simpler to aid understanding. Tutorials, references, and examples are regularly checked for mistakes, but we cannot guarantee complete accuracy. By using CodingAsk.com, you agree to our terms of use, cookie, and privacy policy.
Copyright 2010-2024 by Refsnes Data. All Rights Reserved.