HTML Lists
HTML lists allow web developers to group a set of related items in lists.
The HTML have three ways for specifying lists of information. All lists must contain one or more list elements.
<ul>- An unordered list. This will list items using plain bullets.<ol>- An ordered list. This will use different schemes of numbers to list your items.<dl>- A definition list. This arranges your items in the same way as they are arranged in a dictionary.
HTML Unorder Lists
An unordered list is a collection of related items that have no special order or sequence.
This list is created by using HTML <ul> tag.
Each item in the list is marked with a bullet.
This example shows how to create unordered lists:
Example
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ul>
Read more about <ul> tag.
HTML Ordered Lists
Ordered lists used to define an ordered or numbered list of items.
The numbering style comes in many forms, including letters, Roman numerals, and regular numerals.
This example shows how to create ordered lists:
Example
<ol>
<li>One</li>
<li>Two</li>
<li>Three</li>
</ol>
Read more about <ol> tag.
HTML Definition Lists
The HTML and XHTML supports a list style which is called definition lists where entries are listed like in a dictionary or encyclopedia.
The definition list is the ideal way to present a glossary, list of terms, or other name/value list.
Example
<dl>
<dt>Apple</dt>
<dd>A hard, round fruit with a smooth green, red or yellow skin</dd>
<dt>Banana</dt>
<dd>A curved fruit with yellow skin that grows in hot countries</dd>
<dt>Manogo</dt>
<dd>A tropical fruit that has a yellow and red skin and is yellow inside</dd>
</dl>
Read more about <dl> tag.
| Tags | Description |
|---|---|
| <dd> | Defines the definition of a term within a list of defined terms <dt> enclosed by a definition list <dl>. |
| <dl> | Defines contains a list of terms and definitions. |
| <dt> | Defines a definition list term in a list of terms and definitions. |
| <li> | specifies a list item as contained in an ordered list <ol>, unordered list <ul>. |
| <ol> | Defines an ordered or numbered list of items. |
| <ul> | Defines unordered list, namely a collection of items that does not have a numerical ordering. |
Note: A complete list of all HTML tags, see HTML Tag Reference.