Guide to Creating Ordered Lists
HTML supports unnumbered, numbered, and definition lists. You can nest lists too, but use this feature sparingly because too many nested items can get difficult to follow.
How to Creat Bullet Point List - Un-numbered List
To make an unnumbered, bulleted list:
- Atart with an opening list <ul> (for unnumbered list) tag.
- Enter the <li> (list item) tag followed by the individual item; no closing </li> tag is needed.
- End the entire list with a closing list </ul> tag.
Below is a sample three-item list:
<ul> <li> apples <li> bananas <li> grapefruit </ul>
The output is:
The <li> items can contain multiple paragraphs. Indicate the paragraphs with the <p> paragraph tags.
A numbered list (also called an ordered list, from which the tag name derives) is identical to an unnumbered list, except it uses <ol> instead of <ul>. The items are tagged using the same <li> tag. The following HTML code:
<ol> <li> oranges <li> peaches <li> grapes </ol>
Produces this formatted output:
Here is a sample nested list:
<ul> <li> A few New England states: <ul> <li> Vermont <li> New Hampshire <li> Maine </ul> <li> Two Midwestern states: <ul> <li> Michigan <li> Indiana </ul> </ul>
The nested list is displayed as:
- A few New England states:
- New Hampshire
- Two Midwestern states: