Compact Lists

Section 1 - Introduction
Section 2 - Basics
Section 3 - Next Level
Section 4 - Advanced
      Fancy Lists
         Compact lists
         Nesting lists
         Unordered types
         Ordered types
         Start numbers
         Putting it together
         You Try It!
      Forms
      Advanced Tables
      Frames
      Style Sheets
      Image Maps
Section 5 - Publishing
Section 6 - Extras
Appendices
Back when you learned lists, you learned how to make a simple list that involved a few key tags. Let's look at a nice, normal dictionary list. Each letter in the series has two words that follow it. What you would see is this:
A
Apple
Anaconda
B
Banana
Boa
C
Casaba
Cobra
While that is a very nice list, it's not exactly paradise if you're trying to save space. The answer is to compact the list. To do that, just add the "compact" command within the list tag. It looks like this:
<dl COMPACT>
<dt>A</dt>
<dd>Apple</dd><dd>Anaconda</dd>
<dt>B</dt>
<dd>Banana</dd><dd>Boa</dd>
<dt>C</dt>
<dd>Casaba</dd><dd>Cobra</dd></dl>
This particular list would now look like this:
A
Apple
Anaconda
B
Banana
Boa
C
Casaba
Cobra
You won't use compact too often, but know it's there. It should be noted that it has been depreciated, or the use has been discouraged, in versions of HTML 4.01 or later. By the way, not only can definition lists be compacted, but ordered and unordered, although it honestly doesn't save much space. Next lesson is more useful. I promise.

Back Home Forward