Category: 

What is an Ordered List?

Article Details
  • Written By: Jessica Reed
  • Edited By: Heather Bailey
  • Last Modified Date: 11 November 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
Snake charmers get snakes to “dance” because of the movement of their flute-like instruments, not their music.  more...

December 4 ,  1945 :  The United States Senate approved of US participation in the United Nations.  more...

When programming a website using HTML (Hypertext Markup Language) coding, an ordered list is used to create a list of items that are numbered to show the order they should go in. The list might be used simply for listing objects, for showing items ranked from most to least important, or for numbering steps in a process. To create this type of list using HTML, the user first creates an opening ordered list tag. Next he adds in list item tags and inserts the actual items that should appear on his list. He closes each list item tag after the item and when the list is complete he closes the ordered list tag.

The proper opening HTML tag is <ol> and the closing tag is </ol>. The OL stands for "ordered list." This type of list is the opposite of an unordered list, created using the <ul> and </ul> HTML tags. When the computer sees the "ol" tag, it knows to number the items in the list according to the order they appear in.

Ad

After creating the opening tag, the user inserts a <li> tag, which stands for list item. This is the opening tag for the first item in his list. He types the item itself after the opening tag and then inserts the list item closing tag which appears as </li>. He repeats this for each item on his list. When he has inserted all the items on his list, he uses an <ol> closing tag on the next line to show the end of the list.

Here is an example of the code for an ordered list in HTML:

<ol> <li>Insert the ordered list opening tag.</li> <li>Insert the list item opening tag.</li> <li>Type the first item on the list after the list item opening tag.</li> <li>Insert the list item closing tag.</li> <li>Repeat with the rest of the list items.</li> <li>Insert the ordered list closing tag.</li> </ol>

This shows the code for the list itself. Right now it does not show the formatting for the list. When the code is displayed in a web browser, it will convert the HTML code and display it properly as a list. The list created from the above code will appear as follows:

  1. Insert the ordered list opening tag.
  2. Insert the list item opening tag.
  3. Type the first item on the list after the list item opening tag.
  4. Insert the list item closing tag.
  5. Repeat with the rest of the list items.
  6. Insert the ordered list closing tag.

Anyone creating this list or any other element using HTML coding should keep in mind the stricter rules for newer versions of HTML. With the introduction of CSS for managing the layout and appearance of web pages, HTML now only controls the basic information presented on a page. It also follows stricter guidelines to ensure all code is uniform. A person working with HTML should check that his code has an opening and a closing tag, and that the closing tag has a backslash in it. He should ensure that all letters in the tags are lowercase and that his document has the proper HTML, head, and body tags at the top along with a page declaration.

Ad

You might also Like

Recommended

Discuss this Article

Post your comments

Post Anonymously

Login

username
password
forgot password?

Register

username
password
confirm
email