Using HTML Lists
To begin, we need a tag to begin and end the entire list. For starters, let's use an unordered list. This will create a list with bullets next to the list items. The opening tag is <ul>, and the closing tag is... yep, you guessed it... </ul>. Now, to set off each item in your list, you use the <li> tag, followed by your text, then close each list item with the </li> tag. Here is a sample list with two list items:
<ul>
<li>I am item one</li>
<li>I am item two</li>
</ul>
This will give us the bulleted list below:
- I am item one
- I am item two
Notice the list is indented somewhat from the rest of the text.
You can also use the type attribute to specify the type of bullets to be used in the list. The possible types are listed below:
| Type | Description |
|---|---|
| disc | The default. Uses a plain colored-in disc. |
| circle | Uses a hollow circle. |
| square | Uses a colored-in square. |
So, if you want to use the square type of bullet, you could do the following:
<ul type="square">
<li>Square 1</li>
<li>Square 2</li>
</ul>
Which will give you the following list:
- Square 1
- Square 2
You can also use an ordered list in the same way you use the unordered list. Instead of using <ul></ul>, you would use <ol></ol>, like this:
<ol>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ol>
This gives you a numbered list rather than the bulleted list:
- Item 1
- Item 2
- Item 3
You can use the type attribute to specify the type of numbering/lettering system to be used in the ordered list. The types are listed below:
| Type | Description |
|---|---|
| 1 | The default. Uses Arabic numerals. |
| I | Uses uppercase Roman numerals. |
| i | Uses lowercase Roman numerals. |
| A | Uses uppercase letters. |
| a | Uses lowercase letters. |
So, if you want to use uppercase Roman numerals, you could do the following:
<ol type="I">
<li>Roman I</li>
<li>Roman II</li>
</ol>
Which will give you the following list:
- Roman I
- Roman II
Well, that does it for HTML lists, so lets go on to the next section: Using the Body Tag Attributes.
Copyright © 1997-2010 The Web Design Resource. All rights reserved. Disclaimer.

