|
Lists
Lists are a powerful way to organise data in your document. There are three basic types of lists that you
should know about:
- ordered lists;
- unordered lists;
- definition lists.
The first two types follow the same basic format. First, you define the list format, and then each list
item is marked with the <li> For example, the code for the above list looks like this:
<ul>
<li>ordered lists;
<li>unordered lists;
<li>definition lists.
</ul>
<ol>...</ol>
-
Ordered List - Displays a list in which each item is numbered in order.
- Example Code
<ol>
<li>Augustus</li>
<li>Tiberius</li>
<li>Caligula</li>
<li>Claudius</li>
<li>Nero</li>
</ol>
-
- Example Output
-
- Augustus
- Tiberius
- Caligula
- Claudius
- Nero
<ul>...</ul>
-
Unordered List - Displays a bulleted list.
- Example Code
<ul>
<li>The Eclogues</li>
<li>The Georgics</li>
<li>The Aeneid</li>
</ul>
-
- Example Output
-
- The Eclogues
- The Georgics
- The Aeneid
<dl>...</dl>
-
Definition List - Displays a list of terms with indented definitions.
- Example Code
<dl>
- <dt>Marcus Tullius Cicero</dt>
- <dd>106-43BC. Laywer and statesman. Consdidered the greatest orator. Consul in 63BC.</dd>
- <dt>Gaius Valerius Catullus</dt>
- <dd>84-54 BC. Poet, often considered the greatest writer of Latin lyric verse.</dd>
- <dt>Publius Vergilius Maro</dt>
- <dd>70-19BC. Poet, author of the Aenead.</dd>
- <dt>Publius Ovidius Naso</dt>
- <dd>43BC - after 16AD. Poet, author of the Metamorphoses.</dd>
</dl>
-
- Example Output
-
- Marcus Tullius Cicero
- 106-43BC. Laywer and statesman. Consdidered the greatest orator. Consul in 63BC.
- Gaius Valerius Catullus
- 84-54 BC. Poet, often considered the greatest writer of Latin lyric verse.
- Publius Vergilius Maro
- 70-19BC. Poet, author of the Aenead.
- Publius Ovidius Naso
- 43BC - after 16AD. Poet, author of the Metamorphoses.
|
[
Back |
Home |
Next
]
|