HTML allows us to format attractive lists to... er, list things. A list of important points in no particular order; a list of parts for a project; a list of sequential instructions for some task; these are just a few uses for lists.
This page addresses three kinds of lists: ordered, unordered and definition. We will also look at nested lists. As with most HTML tags, the various list tags come in pairs and surround the items they effect.
The ordered list (<ol></ol>), as it sounds, makes alpha/numeric lists. Ordered lists are great for listing sequential instructions, driving directions, and a host of other things that need order.
<li></li> or list item tag pair is used for the individual items on your list.type attributestyle attribute with list-style-type definition in the ol or li tag. The default is decimal numbers: 1, 2, 3, etc.style="list-style-type:upper-alpha".style="list-style-type:lower-alpha".style="list-style-type:upper-roman".style="list-style-type:lower-roman".start attribute in the <ol> tag to indicate the starting value of the list. Use the value attribute in the <li> tag to choose a specific value for the list item. Both attributes use positive integers, the browser interprets the correct style of displaying the number.There are many more types of numbering to choose, w3schools.com has a nice page on the subject: http://www.w3schools.com/CSS/pr_list-style-type.asp
The unordered list (<ul></ul>) creates the standard bulleted list. These lists are useful for listing things in no particular order with no implied emphasis.
<li></li> tag pair is used for each item, just like the ordered list.style attribute with list-style-type property in either the <ul> or <li> tags to choose the bullet style you want.style="list-style-type:disc"style="list-style-type:circle"style="list-style-type:square"The definition list (<dl></dl>) works naturally for glossaries and is also useful whenever you wish to pair a word or phrase with a longer paragraph.
<dt></dt>)<dd></dd>)You can also "nest" lists. That is, have a list inside of a list. The trick is to remember all the closing list tags. Nested lists are very useful for showing hierarchy of things in the list. Try it and see what happens.