Lists
How to build lists in html
Lists that contain items in a sequence are called ordered lists. HTML supports ordered lists through the <ol> tag. Lists may be ordered in increasing sequences of numbers, upper and lower case roman numerals, upper and lower case alphabets and so on. The type attribute is used to specify the sequence used. However, it is now recommended that the type of sequence should be part of a Style Sheet definition rather than the value of the 'ol' tag's type attribute. An unordered list is a bulleted list of items with no sequence. The <ul> tag is used to markup unordered lists. The bullet may be a square, circle, disc or an image specified by the user. The bullet type should be specified in the Style Sheet definition of the unordered list. The <li> tag is used to denote each item in both ordered and unordered lists.
| List Type | List Markup | List Output |
|---|---|---|
| Ordered List | <ol> <li> Item 1 <li> Item 2 <li> Item 3 </ol> |
|
| Unordered List | <ul> <li> Item 1 <li> Item 2 <li> Item 3 </ul> |
|
Now, let us add a very simple ordered list to our new catalogue page. The list should be ordered by lower case roman numerals and should start after the table's ending tag. Add the following items to the list:
1. Please allow two days for delivery 2. All items are payable COD 3. Delivered goods will not be identical to those pictured here. 2. Please e-mail someone@someplace.com for bulk orders
Don't forget to add a style definition in the following lines to Style.css before viewing the html output
ol
{
font-family: Arial,Verdana,Helvetica;
list-style-type: lower-roman;
text-align: Left;
line-height: 120%;
margin-left: 30px;
margin-top: 10px;
margin-bottom: 10px;
margin-right: 30px
}
li
{
font-family: Arial,Verdana,Helvetica;
font-size: 10pt;
font-weight: bold
}
ScreenShot 4d: The list in catalogue.htm