Lists are used at various occasions such as listing of methods to carry out a task, list of movie names, set of steps of a recipe and so on.
Html provides us with 3 different types of lists.
- Ordered Lists
- Unordered Lists
- Definition Lists
Ordered lists are the lists where the list items are numbered. This can be used where there is a need to number the steps. For example, steps to make a photo frame using waste materials.
The <li> tag
The li or the list item tag is used to enter the list items.
<h4>Steps to make tea</h4> <ol> <li>Boil Water</li> <li>Put some crushed ginger</li> <li>Put sugar and tea powder</li> <li>Add some milk</li> <li>Pour into a cup and Enjoy</li> </ol>
Steps to make tea
- Boil Water
- Put some crushed ginger
- Put sugar and tea powder
- Add some milk
- Pour into a cup and Enjoy