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.
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:
- Insert the ordered list opening tag.
- Insert the list item opening tag.
- Type the first item on the list after the list item opening tag.
- Insert the list item closing tag.
- Repeat with the rest of the list items.
- 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.