How To

How to Create Lists in HTML

Contributor
By Melanie Rogers
eHow Contributing Writer
(1 Ratings)

Creating lists in HTML (Hyper Text Markup Language) is an important technique in producing easy-to-read web content. While many web-page editors create the tags for you, it is helpful to understand the code, so you can make corrections as needed. It's also fun to understand how a web page is formatted.

There are three types of lists you can create using HTML: ordered lists, unordered lists and definition lists. The following steps will help you create all three. (This article assumes you are familiar with basic HTML format.)

Difficulty: Moderately Easy
Instructions

Things You'll Need:

  • Text editor
  1. Step 1

    Understand that unordered lists are also called bulleted lists. A bullet is a small shape--usually a small black disc--which is placed at the beginning of each list item. There are three HTML tags you will use to create an unordered list.

    Start the list with a <UL> tag. After you have opened the unordered list, begin your list items on the next line.

    Place a <LI> tag in front of each list item. It is not necessary to use a closing tag for each list item, but it's a good habit to get into.
    At the end of your list, close with a </UL> tag. The backslash before the letters represents the close of the tag.

  2. Step 2

    Create ordered lists, also called numbered lists. The format is the same as for unordered lists, but the opening and closing tag are different.

    Open the list with a <OL> tag and close the list with </OL>.

    Use a <LI> tag in front of each item in your list.

  3. Step 3

    Use a definition list for things like word or concept definitions. It looks similar to a dictionary entry.

    Enclose your definition list with the tags <DL> and </DL>.

    Within the definition list tags, use two tags, which are unlike the ones in the ordered and unordered lists.
    <DT> is used for the definition term, which is the word being defined.
    <DD> is used for the actual definition of the word, or definition defined.

    Just as with the list-item tags, it is optional to use a closing tag for definition term and definition defined, but it is good form to do so.

  4. Step 4

    Create lists within lists. This is convenient for creating outlines. To create lists within lists, simply open up new list tags. If you create ordered lists within each other, the numbers will change to reflect the outline format. If you create unordered lists within lists, the bullet shapes will change.

    Remember to close each list tag.

Tips & Warnings
  • Save and preview your work often, to make sure it looks the way you want it to. Indenting each item in the list to makes it easier to see where the list begins and ends.

Post a Comment

Post a Comment

Have you done this? Click here to let us know.

I Did This

Related Ads

Internet
Virginia DeBolt,

Meet Virginia DeBolt eHow’s Internet Expert.

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US

Demand Media
eHow_eHow Technology and Electronics