Posts in current category

HTML5 <ol> tag


May 03, 2021 17:00 HTML5


Table of contents


HTML5 labels are used to define an ordered list in a document. Please refer to the following example:

2 different examples of ordered lists:

<ol>
 <li>Coffee</li>
 <li>Tea</li>
 <li>Milk</li>
</ol>

<ol start="50">
 <li>Coffee</li>
 <li>Tea</li>
 <li>Milk</li>
</ol>
Try it out . . .

Browser support

HTML5 <ol> tag HTML5 <ol> tag HTML5 <ol> tag HTML5 <ol> tag HTML5 <ol> tag

Most browsers currently support the hashtag.


Label definition and instructions for use

The label defines an ordered list. The list is sorted in numbers.

Use the hashtag to define the list options.


Tips and comments

Tip: If you need a sequenceless table, use the hashtag.

Tip: Use CSS to define list styles.


The difference between HTML 4.01 and HTML5

The "start" and "type" properties are discarded in HTML 4.01 and are not supported by HTML5.

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

The "compact" property is obsolete in HTML 4.01 and is not supported in HTML5.


Property

New: HTML5 new property.

Property Value Describe
compact compact Not supported in HTML5, not in favor of use. /b10>Use styles instead of styles. The specified list renders a smaller effect than normal.
reversed New reversed Specified list in reverse order (9,8,7...)
start number HTML5 is not supported and is not approved of use. U se styles instead of styles. Specifies the starting point in the list.
type 1
A
A

Specify the type of list. N ot in favor of use. Use styles instead.


Global properties

The label supports global properties and views the full property sheet HTML global properties.


The event property

The label supports all HTML event properties.


Related articles

HTML tutorial: HTML list