![]() |
Tutorials
| Workshop
| Troubleshooting
|
Markup Tags
ListsHTML supports unnumbered, numbered, and definition lists. You can nest lists too, but use this feature sparingly because too many nested items can get difficult to follow. Unnumbered Lists To make an unnumbered, bulleted list,
Below is a sample three-item list: <UL> <LI> apples <LI> bananas <LI> grapefruit </UL> The output is:
The <LI> items can contain multiple paragraphs. Indicate the paragraphs with the <P> paragraph tags. Numbered Lists A numbered list (also called an ordered list, from which the tag name derives) is identical to an unnumbered list, except it uses <OL> instead of <UL>. The items are tagged using the same <LI> tag. The following HTML code: <OL> <LI> oranges <LI> peaches <LI> grapes </OL> produces this formatted output:
Definition Lists A definition list (coded as <DL>) usually consists of alternating a definition term (coded as <DT>) and a definition definition (coded as <DD>). Web browsers generally format the definition on a new line and indent it. The following is an example of a definition list: <DL> <DT> Chip <DD> Chip, the best guide to computing. It is situated in Mumbai. <DT> Microsoft <DD> Microsoft the software gaint. Is located at redmond Washington </DL> The output looks like:
The <DT> and <DD> entries can contain multiple paragraphs (indicated by <P> paragraph tags), lists, or other definition information. The COMPACT attribute can be used routinely in case your definition terms are very short. If, for example, you are explaning some terms, the options may fit on the same line as the start of the definition. <DL COMPACT> <DT> -HTTP <DD>Hyper Text Transfer Protocol <DT> URL <DD>Universal Resource Locator </DL>The output looks like:
Nested Lists Lists can be nested. You can also have a number of paragraphs, each containing a nested list, in a single list item. Here is a sample nested list: <UL> <LI> List of Computer devices <UL> <LI> Keyboard <LI> Mouse <LI> Monitor </UL> <LI> Processors <UL> <LI> Pentium <LI> AMD </UL> </UL> The nested list is displayed as
|
||||||||||||||||||||||||
|