Use the Definition List style when you want to set up a Glossary or Dictionary type page. But the Definition List tags can also be used for creative left margin indenting for other text pages. The major difference between this type of list and the Ordered and Unordered lists is that there are no bullets, numbers or letters setting off each list item. Also Definition Lists do not use the <li> or List Item tag.
EXAMPLE:
COLORS
- RED
- This text is red
- ORANGE
- This text is orange
- YELLOW
- This text is yellow
- GREEN
- This text is green
- BLUE
- This text is blue
- PURPLE
- This text is purple
NOTES: The Definition List items will be single spaced as above, unless you use 2 or more line break tags.
I have used the <dd> tag by itself to indent sections of text. I close the tag </dd> to return to the regular left margin spacing. I imagine you can continue to stack these <dd> tags to produce further indentations, but I have not tried this myself.
TAGS: These are presented in the order of use.
<dl> - Opens the Definition List.
- <dt> - Definition Term, or the word to be defined.</dt>
- <dd> - Definition Data, the actual definition. This section is indented further.</dd>
- <dt> - The 2nd word to be defined.</dt>
- <dd> - The definition data for the 2nd word, again indented.</dd>
- </dl> - Closes the Definition List.
SIMILAR LIST AS ABOVE. Real tags and double line breaks:
Open the Definition List.
- Definition Term, or the word to be defined,
- Definition Data, the actual definition. This section is indented further. As you can see, the whole paragraph is indented.
- The 2nd word to be defined.
- The definition data for the 2nd word, again further indented. This whole paragraph is also indented.
Close the Definition List.
GRAPHICS: Use buttons or small images in front of each list item instead of bullets (as in unordered lists) or numbers (as in ordered lists). Simply add the img src tag right after the <dd> tag, and then type the definition:
- This is the first item.
- This is the second item.
- This is a very long line and shows what happens when we get to the end of this definition. The wrapped part should start directly under the first character of the line above it. But it doesn't! So don't use long definitions that will wrap if you use images.
|