Get the App
SLTechnology News&Howtos  ›  Development  › 

How to implement ordered list in HTML

Shulou Source: shulou.com Published: 2022-06-01 06:31:49 10月04日 Update

This article mainly shows you "HTML how to achieve an ordered list", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to achieve an ordered list in HTML" this article.

An ordered list created using elements, with each list item beginning with an element. An ordered list is used when the order of the list items is important.

List items in an ordered list are marked with numbers. This is an example:

Try this code for example »

Fasten your seatbelt

Starts the car's engine

Look around and go

-the output of the above example is as follows:

Fasten Safety Belt

Start the engine of the car

Look around

The item number in an ordered list usually starts with 1. However, if you want to change the start property, you can use it, as shown in the following example:

Try this code for example »

Mix ingredients

Bake in oven for an hour

Allow to stand for ten minutes

-the output of the above example is as follows:

Mixed batching

Bake in the oven for an hour

Stand still for ten minutes

Like an unordered list, you can also use the CSSlist-style-type property to change the numbering type in an ordered list. The following style rules change the tag type to Roman numerals.

Try this code for example »

Ol {

List-style-type: upper-roman

}

The above is all the content of the article "how to achieve an ordered list in HTML". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Order code content attributes examples articles elements beginning numbers tags types learning help output important security Roman numerals examples seat belts hours Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Huawei Docker Shulou Technology Xiaomi