Easy Tutorial
❮ Met Doc Close Index ❯

Ol type Attribute

Ol Object

Example

Setting an ordered list with lowercase letters:


Definition and Usage

The type attribute sets or returns the value of the type attribute of an ordered list.

The type attribute specifies the type of marker to be used in the list (letters or numbers).


Browser Support

All major browsers support the type attribute.


Syntax

Return the type attribute:

Set the type attribute:

Attribute Values

Value Description
1 Default. Decimal numbers (1, 2, 3, 4)
a Alphabetical ordered list, lowercase (a, b, c, d)
A Alphabetical ordered list, uppercase (A, B, C, D)
i Roman numerals, lowercase (i, ii, iii, iv)
I Roman numerals, uppercase (I, II, III, IV)

Technical Details

| Return Value: | String, representing the type of marker used in the ordered list. | | --- | --- |


More Examples

Example

Return the type of marker used in the ordered list:

x Output result:

Example

Set an ordered list with uppercase letters:

Example

Set an ordered list with lowercase Roman numerals:

Example

Set an ordered list with uppercase Roman numerals:


Related Articles

HTML Reference: HTML <ol> type Attribute


Ol Object

❮ Met Doc Close Index ❯