Markup Tags

Sr.No. Topics
1

HTML

2
HEAD
3
TITLE
4
BODY
5
Headings
6
Paragraphs
7
Lists
8
Preformatted Text
9
Extended Quotations
10
Forced Line Breaks/Postal Addresses
11
Horizontal Rules

 

Lists

HTML 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,

  1. start with an opening list <UL> (for unnumbered list) tag
  2. enter the <LI> (list item) tag followed by the individual item; no closing </LI> tag is needed
  3. end the entire list with a closing list </UL> tag

Below is a sample three-item list:

    <UL>
    <LI> apples
    <LI> bananas
    <LI> grapefruit
    </UL>

The output is:

  • apples
  • bananas
  • grapefruit

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:

  1. oranges
  2. peaches
  3. grapes

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:

Chip
Chip, the best guide to computing. It is situated in Mumbai
Microsoft
Microsoft the software gaint. Is located at redmond Washington

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:
-HTTP
Hyper Text Transfer Protocol
-URL
Universal Resource Locator

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

  • List of Computer devices
    • Keyboard
    • Mouse
    • Monitor
  • Processors
    • Pentium
    • AMD