Style listStyleType attribute

Definition and Usage

listStyleType Sets or returns the list item marker type of the attribute.

See also:

CSS Tutorial:CSS List

CSS Reference Manual:list-style-type property

HTML DOM Reference Manual:listStyle property

Instance

Example 1

Change the list item marker type to "upper-roman":

document.getElementById("myList").style.listStyleType = "upper-roman";

Try It Yourself

Example 2

All different list style types:

var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myList").style.listStyleType = listValue;

Try It Yourself

Example 3

Returns the list item marker type:

alert(document.getElementById("myList").style.listStyleType);

Try It Yourself

Syntax

Return the listStyleType attribute:

object.style.listStyleType

Set the listStyleType attribute:

object.style.listStyleType = value

Attribute Value

Value Description
armenian The marker is the traditional Armenian numbering.
circle The marker is a circle.
cjk-ideographic The marker is a simple ideographic number.
decimal The marker is a number. This is the default value for <ol>.
decimal-leading-zero The marker is a number with a leading zero (01, 02, 03, etc.).
disc The marker is a solid circle. This is the default value for <ul>.
georgian The marker is the traditional Georgian numbering.
hebrew The marker is the traditional Hebrew numbering.
hiragana The marker is the traditional hiragana numbering.
hiragana-iroha The marker is the traditional hiragana iroha numbering.
katakana The marker is the traditional katakana numbering.
katakana-iroha The marker is the traditional katakana iroha numbering.
lower-alpha The marker is lowercase English letters (a, b, c, d, e, etc.).
lower-greek The marker is lowercase Greek letters.
lower-latin The marker is lowercase Latin letters (a, b, c, d, e, etc.).
lower-roman The marker is lowercase Roman numerals (i, ii, iii, iv, v, etc.).
none Does not display a marker.
square The marker is a square.
upper-alpha The marker is uppercase English letters (A, B, C, D, E, etc.).
upper-latin The marker is uppercase Latin letters (A, B, C, D, E, etc.).
upper-roman The marker is uppercase Roman numerals (I, II, III, IV, V, etc.).
initial Sets this property to its default value. See initial.
inherit Inherits this property from its parent element. See inherit.

Technical Details

Default Value: <ul> is set to "disc", <ol> is set to "decimal".
Return Value: A string that indicates the type of list.
CSS Version: CSS1

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support Support Support Support Support