HTML/Lists

There are three kinds of lists in HTML:


 * ordered lists
 * unordered lists
 * definition lists

Overview
Ordered and unordered lists are both lists of items. The only difference is that items are marked with numbers in ordered lists and bullets in unordered lists.


 * To create an ordered list, use the  tags.


 * To create an unordered list, use the  tags.


 * To create an item in a list, use the  tags between a set of list tags.

Lists can be placed inside one another. This is called "nesting". Ordered lists can be nested inside unordered lists and vice versa. The only limit to nesting is the physical space available on a page; each nested list is indented more and leaves less space for its items than its parent.

To nest, do this:

Ordered list
The code for an ordered list: The output of the above code:


 * 1) Item 1
 * 2) Item 2
 * 3) Item 3

Unordered list
The code for an unordered list: The output of the above code:


 * Item 1
 * Item 2
 * Item 3

Nested list
The code for a mixed nested list: The output of the above code:

 Item 1  Item 1.1 Item 1.2  Item 1.2.1 Item 1.2.2 Item 1.2.3    </li> <li>Item 2</li> <li>Item 3 <ul> <li>Item 3.1</li> <li>Item 3.2</li> </ul></li> </ol>

Overview

 * To create a definition list, use the  tags.
 * To create a term on the list, use the  tags.
 * To create a definition in a list, use the  tags between a set of list tags.

Examples
<dl> <dt>Term 1</dt><dd>Definition of the first term</dd> <dt>Term 2</dt><dd>Definition of the second term</dd> <dt>Term 3</dt><dd>Definition of the third term</dd> </dl>

HTML/Списки