You are here: Reference > HTML > attributes > type (dir, li, menu, ol, ul)

type attribute (dir, li, menu, ol, ul)

Browser support:
Specifies the numbering style of a list.
This attribute is deprecated. Use the list-style-type style property instead.
JavaScript page for this attribute: type. You can find other example(s) there.

Possible values:

String that sets the type of the numbering style.
One of the following values:
1
Indicates numbers. Default for ol elements. This value is not supported for ul elements in Safari and Google Chrome.
a
Indicates lowercase letters. This value is not supported for ul elements in Safari and Google Chrome.
A
Indicates uppercase letters. This value is not supported for ul elements in Safari and Google Chrome.
i
Indicates lowercase Roman numerals. This value is not supported for ul elements in Safari and Google Chrome.
I
Indicates uppercase Roman numerals. This value is not supported for ul elements in Safari and Google Chrome.
circle
Indicates a hollow circle. This value is not supported for ol elements in Safari and Google Chrome.
disc
Indicates a solid disc. Default for ul elements. This value is not supported for ol elements in Safari and Google Chrome.
square
Indicates a solid square. This value is not supported for ol elements in Safari and Google Chrome.
Default: 1.

Example HTML code 1:

This example illustrates the use of the type attribute:
<ul type="square">
    <li>Apple</li>
    <li>Pear</li>
    <li>Peach</li>
</ul>
Did you find this example helpful? yes no

Example HTML code 2:

Recommendation:
<ul style="list-style-type:square">
    <li>Apple</li>
    <li>Pear</li>
    <li>Peach</li>
</ul>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content