HTML Tags: Lists
These are the HTML tags you use to make lists.
| Tag | Type | Description |
|---|---|---|
<ul> | Block | Creates an unordered list |
<ol> | Block | Creates an ordered list |
<li> | Other | Defines a list item |
<ul>
Creates an unordered list (unnumbered).
| LIVE PREVIEW
- Apple
- Banana
- Orange
<ol>
Creates an ordered list (numbered).
Possible attributestype=[...]— numbering type. Can be:1(numbers: 1, 2, 3, ...)a(lowercase letters: a, b, c, ...)A(uppercase letters: A, B, C, ...)i(lowercase Roman: i, ii, iii, ...)I(uppercase Roman: I, II, III, ...)
start=[...]— from what number the list starts (always use arabic numeral like 1, 2, 3 for the value regardless oftype)reversed— start numbering in reverse order
| LIVE PREVIEW
- One
- Two
- Three
<li>
Defines a list item. It must be put inside <ol> or <ul>.
You can create nested list by putting <ol> or <ul> inside <li>.
value=[...]— set current numeral value for<ol>(always use arabic numeral like 1, 2, 3 for the value). The next list item will continue numbering from this value.
| LIVE PREVIEW
- third item
- fourth item
-
fifth item
- subitem A
- subitem B
References
- HTML elements reference (MDN) — https://developer.mozilla.org/en-US/docs/Web/HTML/Element