HTML Lists
HTML offers three ways for specifying lists of information. All lists must contain one or more list elements.
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 List
We can use the type attribute for <ul> tag to specify the type of bullet we like. By default, it is a disc.
Following are the possible options: -
<ul type = "square">
<ul type = "disc">
<ul type = "circle">
Eg:
<li>Apple</li>
<li>Orange</li>
<li>Banana</li>
</ul>
Output:
- Apple
- Orange
- Banana
Ordered List
You can use the type attribute for <ol> tag to specify the type of numbering you like. By default, it is a numerical list. Following are the possible options -
<ol type = "1"> - Default - Numerals.
<ol type = "I"> - Upper-Case Numerals.
<ol type = "i"> - Lower-Case Numerals.
<ol type = "A"> - Upper-Case Letters.
<ol type = "a"> - Lower-Case Letters.
Eg:
<li>Apple</li>
<li>Orange</li>
<li>Banana</li>
</ol>
Output:
- Apple
- Orange
- Banana