XHTML & CSS Tutorial - Lists
Lists are very handy for well listing things. There are 2 types of lists in XHTML unordered and ordered.
Unordered list
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
- Item 1
- Item 2
- Item 3
A unordered list is just like bullet points. To start a list you need to use the <ul> tag. For every item you list you need to use the list item tag (<li> don't forget to close them both too!).
Ordered list
<ol>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ol>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ol>
- Item 1
- Item 2
- Item 3
An ordered list uses numbers to list the items. Just like the unordered list you need you use the list item tags (<li>).