What is a list?
A list is a record of short pieces of information, such as people’s names, usually written or printed with a single thing on each line and ordered in a way that makes a particular thing easy to find.
HTML offers three ways for specifying lists of information. All lists must contain one or more list
The types of lists that can be used in HTML are :
ul : An unordered list. This will list items using plain bullets.
ol : An ordered list. This will use different schemes of numbers to list your items.
dl : A definition list. This arranges your items in the same way as they are arranged in a dictionary.
Unordered HTML List
<ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul>
Ordered HTML List
The list items will be marked with numbers by default:
<ol> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ol>
A description list is a list of terms, with a description of each term.
The <dl> tag defines the description list, the <dt> tag defines the term name, and the <dd> tag describes each term.
<dl> <dt>Coffee</dt> <dd>- 500 gms</dd> <dt>Milk</dt> <dd>- 1 ltr Tetra Pack</dd> </dl>