Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the & lt;ol> tag in HTML

Shulou Source: shulou.com Published: 2022-06-01 06:28:37 10月02日 Update

Editor to share with you how to use the tags in HTML, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

HTML tag

Example

2 different ordered list instances:

Coffee

Tea

Milk

Coffee

Tea

Milk

Label definition and instructions for use

The tag defines an ordered list. The order of the list is displayed as numbers.

Use tags to define list options.

Tips and comments

Tip: you can use CSS to render and view the CSS list in detail.

Tip: unordered list, you can use tags.

Differences between HTML4.01 and HTML5

The "reversed" attribute is a new attribute in HTML5.

The "compact" attribute is obsolete in HTML4.01 and is not supported in HTML5.

More Instanc

Example

Set different list styles (using CSS):

Coffee

Tea

Milk

Coffee

Tea

Milk

Example

Use CSS to display different list styles:

Ol.a {list-style-type:armenian;}

Ol.b {list-style-type:cjk-ideographic;}

Ol.c {list-style-type:decimal;}

Ol.d {list-style-type:decimal-leading-zero;}

Ol.e {list-style-type:georgian;}

Ol.f {list-style-type:hebrew;}

Ol.g {list-style-type:hiragana;}

Ol.h {list-style-type:hiragana-iroha;}

Ol.i {list-style-type:katakana;}

Ol.j {list-style-type:katakana-iroha;}

Ol.k {list-style-type:lower-alpha;}

Ol.l {list-style-type:lower-greek;}

Ol.m {list-style-type:lower-latin;}

Ol.n {list-style-type:lower-roman;}

Ol.o {list-style-type:upper-alpha;}

Ol.p {list-style-type:upper-latin;}

Ol.q {list-style-type:upper-roman;}

Ol.r {list-style-type:none;}

Ol.s {list-style-type:inherit;}

Example

List nesting:

Coffee

Tea

Blacktea

Greentea

Milk

Global attribute

Tag supports global attributes, view the complete property sheet HTML global properties.

Event attribute

The tag supports all HTML event attributes.

The above is all the content of the article "how to use tags 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: Attributes tags instances differences globals articles tips support ordering events content more styles not much instructions for use most differences numbers comments knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Information MySQL Shulou Technology Apple