| Using Lists
to Organize Information |
Lists are used in every place to format
the look of the text and make it easy to understand the contents.
HTML has a special set of tags just for displaying lists a
number of special attributes. The lists are divided into two
basic levels:
Ordered lists:
These lists are typically used for indicating a sequence of
events or priorities
Unordered lists:
These Lists display a group of items that are somehow related,
but necessarily in a hierarchical fashion.
|
|
Ordered Lists <OL> |
|
|
Unordered Lists <UL> |
|
|
A Definition or Glossary List <DL> |
|
|
Using the DIR and Menu List Styles |
A list is defined by its opening and closing
tags. For ordered lists (numbered lists), the tags are: <OL>
and </OL> and for constructing
the list you may have to include some more tags in between.
For each item identified with <LI>
tag, the browser starts a new line, indents, and adds a number.
The closing tag </LI> is an
optional one. You can use the standard text formatting elements
for the list contents such as TT, I, etc., and phrase elements-
EM, STRONG, etc. The numbering starts from one and goes on,
but if you want to start with some other number it is also
possible with <start> tag
(the number should be an integer between 2147483647 and -2147483648).
Remember not to use commas in the numbers. <OL
type> tag is used to specify the type of numbering
system to be used."1"- for Arabic; "A"-
for Uppercase alpha; "a"- for Lowercase alpha; "I"-
for Uppercase Roman; "i"- for Lowercase Roman. You
can nest a list inside a list.
Syntax:
<OL>
<LI>List item 1
<LI>List item 2
<LI>List itemN
</OL>
Unordered lists are used to represent a
set of items that are somehow related to one another but need
not follow a specific order. The Syntax is similar to ordered
list. The actual appearance of the unordered list is similar
to that of an ordered list but bullets are used instead of
numbers. You can use the <type>
tag to give the type of bullet to be used.
Syntax:
<UL>
<LI>List item 1
<LI>List item 2
<LI>List itemN
</UL>
| A Definition or Glossary List <DL> |
This tag is used to create a glossary listing,
which is handy for items such as dictionary listings and Frequently
Asked Questions pages. The <DL>
tag is used similarly as in the unordered list tag, but it
requires two items for every entry: a term and its definition.
Marking these two items is done with <DT>
and <DD> tags.
Syntax:
<DL>
<DT>Term1<DD>Definition1
<DT>Term2<DD>Definition2
<DT>TermN<DD>DefinitionN
</DL>
| Using the DIR and Menu List Styles |
The <DIR>
and <MENU> tags were directed
for directory listings and user menus. They use the <LI>
tag to mark each separate item, except for the definition
list. Both the items are typically rendered as unordered lists;
neither do they have any attributes.
Syntax:
<MENU or DIR>
<LI>ListItem1
<LI>ListItem2
<LI>ListItemN
</MENU or DIR>
Copyrights : Layout Galaxy All Rights Reserved
No part of this tutorial may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, electrostatic, magnetic tape, mechanical or otherwise, without prior permission in writing from Layout Galaxy.
|
|