Book
Comments and Lists
Comments and Lists
- Comments
- Unordered list
- Ordered list
- Nested list
Lists
In HTML there are two types of lists <ul>
and <ol
.
<ul>
stands for unordered list, which is the classical list with bullet points.
<ol>
stands for ordered list in which its items are marked with numbers.
Each item of both lists starts with <li>
tag, which stands for list item, and ends with </li>
.
By default a <ol>
will start counting from 1.
However, we are able to change the start point, reverse the counting or even use alphabetical characters.
Examples
Unordered list
- The first item
- The second item...
- The third item!
Ordered list
- The 1st item
- The 2nd item...
- The 3rd item!
- The 4th item!
This ordered list starts from 2000
- the 1st year of the 21st century
- the 2nd year of the 21st century
- the 3rd year of the 21st century
- the 4th year of the 21st century
This ordered list is reversed
- the last year of 21st century
- two years until the end of the 21st century
- three years until the end of the 21st century
- four years until the end of the 21st century
Nested list
- Coffee
- Tea
- Black tea
- Green tea
- Milk
You can find more examples of Lists on w3schools