Lists may be placed in a page using these tags: <ol>
(ordered list) and <ul>
(unordered list). Items are placed inside them using the <li>
(list item) tag. Following is a table showing the two lists side-by-side:
HTML | Output |
---|---|
<ul> <li>Category 1</li> <ul> <li>Item 1-1</li> <li>Item 1-2</li> <li>Item 1-3</li> </ul> <li>Category 2</li> <ul> <li>Item 2-1</li> </ul> </ul> |
|
<ol> <li>Category 1</li> <ol> <li>Item 1-1</li> <li>Item 1-2</li> <li>Item 1-3</li> </ol> <li>Category 2</li> <ol> <li>Item 2-1</li> </ol> </ol> |
|