:: code war·ri·or                    
                   

Definition Lists

If you're creating a page that needs to define some terms, you may find these tags useful. All they really do is indent your text for you, but to do the same thing with other tags you'd probably need to use tables which could prove quite tricky.

The basic concept is the same as for other lists - use a master tag to surround the whole list and other tags for the list items. The main difference here is that you have 2 types of list item - terms and their definitions.

The master tag (like UL and OL) is DL - that goes around the whole list. The terms are surrounded by DT tags and the definitions themselves with DD.

Example:

<DL>

<DT><B>HTML</B></DT>
<DD>HyperText Markup Language</DD>

<DT><B>HTTP</B></DT>
<DD>HyperText Transfer Protocol</DD>

</DL>

HTML
HyperText Markup Language
HTTP
HyperText Transfer Protocol

We have made the definition terms bold (hence the B tags) just to make things a bit clearer. Obviously the formatting is completely up to you.

So now we can move onto Frames.


· code-warrior
· HTML Tutorials
· LISTS


Quick Links
· List Basics
· Numbered Lists
· Definition Lists



SHOP
· Books @ Amazon
· Software @ Amazon

Please send any comments to
This HTML guide is a free resource
© Code Warrior 2002

  

:: made on a mac