Lists are like vertical representation of many items from top to bottom. In HTML lists are of following three types-
Unordered Lists (UL): In unordered lists, items are listed with bullets.
Syntax:
- Sachin Tendulkar
- Saurav Ganguly
- Rahul Dravid
- VVS Laxman
Output:
type: it is used with <ul> to specify the type of bullet. Its possible values are disc / square / circle.
Ordered Lists (OL): In ordered lists, items are listed with numerals.
Syntax:
- Sachin Tendulkar
- Saurav Ganguly
- Rahul Dravid
- VVS Laxman
Output:
type: it is used with <ol> to specify the type of numeral. It’s values are- 1 / a / A / i.
NOTE: The default type in <ul> is “disc” whereas in <ol> it is “1”.
Description Lists (DL): In Description lists, items are listed in a little more detail. two specific tags <dt> and <dd> are used as description terms and description detail respectively.
Syntax:
- India
- India is a democratic country in south asia. It has been the oldest civilization in the world.
- Sri Lanka
- Sri Lanka is another democratic country in south asia. It is located in the Indian Ocean just next to the southern state Tamilnadu of India.
- Bangladesh
- Bangladesh was once a part of Pakistan but in 1971 it became an independent nation.
Output: