|
Quick Menu
|
11. Definition Lists
Yet another variety of lists.
In lesson 6 we learnt how to create two types of lists: ordered <ol>...</ol> and unordered <ul>...</ul> lists. Now we are going to learn a third variety, the definition list. Unlike the lists we learnt earlier, the definition list marks its entries not with a bullet marker or a number, but by its pattern of indentation.
The format for a definition list tag is:
<dl>
<dt> title1 </dt>
<dd> definition1 </dd>
<dt> title2 </dt>
<dd> definition2 </dd>
:
:
:
<dt> titleN </dt>
<dd> definitionN </dd>
</dl>
|
|
|
Site Stats
| There are 7 users online | | click to see where | | 149,242 total unique visitors | | 485,890 total pageviews | | 49 visitors in the last 24 hours | | 37 total visitors today | | 99 pageviews today | | This page has been visited 4,844 times
| | get this script | | Most users online at once: 63 on 01/18/2010 |
|
|
|
|
|
|
The <dl> .... </dl> tags include alternating pairs of titles <dt> ... </dt> and definitions <dd> ... </dd>. A Web browser will generate the list with each definition indented to offset it from the title.
The above example would look like this in your browser.
 |
- title1
- definition1
- title2
- definition2
- titleN
- definitionN
|
The definition list might be used as a glossary; but for our example we will use it to create a short bibliography.
- Open Your HTML file, index.htm in your text editor.
- After the introduction and before the Venus heading enter this code:
<h3>Bibliography</h3>
<p>Check your local book store for these Travel books:</p>
<dl>
<dt>Palmer & Dent (1997). </dt>
<dd><i>Volcanic Explosions: Venus Miracle wonders.</i>
City Of Angels: Bruce & Ursula.</dd>
<dt>courser de jason (2004) </dt>
<dd><i>Venus de planéte et ses Éruptions.</i>
Paris: Masson</dd>
</dl>
Notice We used some of the Special Characters for the ampersand symbol ("&") in the first reference and for the accent marks in the second reference. If you are unfamiliar with the HTML special characters, see lesson 10
- Save and Reload your work.
CHECK YOUR WORK
Here is an EXAMPLE of what your document should appear like, you can close the window once you have compared your work.
PRACTISE
In your own HTML document, you may want to add some more lists and or references using the definition list format.
<dl> ... </dl> <dt> ... </dt> <dd> ... </dd>
Top of page | Previous Lesson| Lessons Index | Next Lesson
|