HTML uses ordered lists to show the order of items. The user creates an opening “ol” tag, adds list item tags, inserts items, and closes each tag. HTML has stricter rules and should contain opening/closing tags, lowercase letters, and correct HTML/head/body tags.
When programming a website using Hypertext Markup Language (HTML) coding, an ordered list is used to create a list of items that are numbered to show the order in which they should be entered. The list could be used simply to list items, to show items ranked from most to least important, or to number the steps in a process. To create this type of list using HTML, the user first creates an opening ordered list tag. It then adds the list item tags and inserts the actual items that should appear in its list. Closes each list item tag after the item and when the list is complete closes the sorted list tag.
The correct opening HTML tag is
. The OL stands for “ordered list”. This type of list is the opposite of an unordered list created using the button
HTML tags. When the computer sees the “ol” tag, it knows to number the items in the list based on the order in which they appear.
After creating the opening tag, the user enters a
. It repeats this for each item in its list. When he has entered all the elements of his list, he uses a
Here is an example of the code for an ordered list in HTML:
This shows the code for the list itself. It doesn’t currently show formatting for the list. When the code is viewed in a web browser, it will convert the HTML code and display it correctly as a list. The list created by the above code will look like this:
Enter the opening tag of the sorted list.
Insert the opening tag of the list item.
Type the first list item after the list item’s opening tag.
Insert the closing tag of the list item.
Repeat with the rest of the list items.
Insert the closing tag of the sorted list.
Anyone creating this list or any other item 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 that all code is uniform. A person working with HTML should verify that their code contains an opening and a closing tag, and that the closing tag contains a backslash. He should ensure that all letters in the tags are lowercase and that his document has the correct HTML, head and body tags at the top along with a page declaration.
Protect your devices with Threat Protection by NordVPN