W3cubDocs

/CSS

list-style-type

Thelist-style-type CSS property specifies the appearance of a list item element.

/* Partial list of types */
list-style-type: disc;
list-style-type: circle;
list-style-type: square;
list-style-type: decimal;
list-style-type: georgian;
list-style-type: cjk-ideographic;
list-style-type: kannada;

/* <string> value */
list-style-type: '-';

/* Identifier matching an @counter-style rule */
list-style-type: custom-counter-style;

/* Keyword value */
list-style-type: none;

/* Global values */
list-style-type: inherit;
list-style-type: initial;
list-style-type: unset;

Initial value disc
Applies to list items
Inherited yes
Media visual
Computed value as specified
Animation type discrete
Canonical order the unique non-ambiguous order defined by the formal grammar

The color of the marker will be the same as the computed color of the element it applies to.

Note: Only a few elements (<li> and <summary>) have a default value of display: list-item. However, the list-style-type property may be applied to any element whose display value is set to list-item. Moreover, because this property is inherited, it can be set on a parent element (commonly <ol> or <ul>) to make it apply to all list items.

Syntax

The list-style-type property may be defined as any one of:

Values

<custom-ident>
A identifier matching the value of a @counter-style or one of the predefined styles:
symbols()
Defines an anonymous style of the list.
<string>
The specified string will be used as the item's marker.
none
No item marker is shown.
disc
  • A filled circle (default value)
circle
  • A hollow circle
square
  • A filled square
decimal
  • Decimal numbers
  • Beginning with 1
cjk-decimal
  • Han decimal numbers
  • E.g. 一, 二, 三, ..., 九八, 九九, 一〇〇
decimal-leading-zero
  • Decimal numbers
  • Padded by initial zeros
  • E.g. 01, 02, 03, … 98, 99
lower-roman
  • Lowercase roman numerals
  • E.g. i, ii, iii, iv, v…
upper-roman
  • Uppercase roman numerals
  • E.g. I, II, III, IV, V…
lower-greek
  • Lowercase classical Greek
  • alpha, beta, gamma…
  • E.g. α, β, γ…
lower-alpha
lower-latin
  • Lowercase ASCII letters
  • E.g. a, b, c, … z
  • lower-latin is unsupported in IE7 and earlier
  • See Browser compatibility section.
upper-alpha
upper-latin
  • Uppercase ASCII letters
  • E.g. A, B, C, … Z
  • upper-latin is unsupported in IE7 and earlier
arabic-indic
-moz-arabic-indic
  • Example
armenian
  • Traditional Armenian numbering
  • (ayb/ayp, ben/pen, gim/keem…
bengali
-moz-bengali
  • Example
cambodian *
  • Example
  • Is a synonym for khmer
cjk-earthly-branch
-moz-cjk-earthly-branch
  • Example
cjk-heavenly-stem
-moz-cjk-heavenly-stem
  • Example
cjk-ideographic
  • Identical to trad-chinese-informal
  • E.g. 一萬一千一百一十一
devanagari
-moz-devanagari
  • Example
ethiopic-numeric
  • Example
georgian
  • Traditional Georgian numbering
  • E.g. an, ban, gan, … he, tan, in…
gujarati
-moz-gujarati
  • Example
gurmukhi
-moz-gurmukhi
  • Example
hebrew
  • Traditional Hebrew numbering
hiragana
  • a, i, u, e, o, ka, ki, …
  • (Japanese)
hiragana-iroha
  • i, ro, ha, ni, ho, he, to, …
  • Iroha is the old japanese ordering of syllabs.
japanese-formal
  • Japanese formal numbering to be used in legal or financial document.
  • E.g., 壱萬壱阡壱百壱拾壱
  • The kanjis are designed so that they can't be modified to look like another correct one
japanese-informal
  • Japanese informal numbering
kannada
-moz-kannada
  • Example
katakana
  • A, I, U, E, O, KA, KI, …
  • (Japanese)
katakana-iroha
  • I, RO, HA, NI, HO, HE, TO, …
  • Iroha is the old japanese ordering of syllabs.
khmer
-moz-khmer
  • Example
korean-hangul-formal
  • Korean hangul numbering.
  • E.g., 일만 일천일백일십일
korean-hanja-formal
  • Formal Korean Han numbering.
  • E.g. 壹萬 壹仟壹百壹拾壹
korean-hanja-informal
  • Korean hanja numbering.
  • E.g., 萬 一千百十一
lao
-moz-lao
  • Example
lower-armenian *
  • Example
malayalam
-moz-malayalam
  • Example
mongolian
  • Example
myanmar
-moz-myanmar
  • Example
oriya
-moz-oriya
  • Example
persian
-moz-persian
  • Example
simp-chinese-formal
  • Simplified Chinese formal numbering.
  • E.g. 壹万壹仟壹佰壹拾壹
simp-chinese-informal
  • Simplified Chinese informal numbering.
  • E.g. 一万一千一百一十一
tamil
-moz-tamil
  • Example
telugu
-moz-telugu
  • Example
thai
-moz-thai
  • Example
tibetan *
  • Example
trad-chinese-formal
  • Traditional Chinese formal numbering.
  • E.g. 壹萬壹仟壹佰壹拾壹
trad-chinese-informal
  • Traditional Chinese informal numbering.
  • E.g. 一萬一千一百一十一
upper-armenian *
  • Example
disclosure-open
  • Symbol indicating that a disclosure widget such as <details> is opened.
disclosure-closed
  • Symbol indicating that a disclosure widget, like <details> is closed.

Non-standard extensions

A few more predefined types are provided by Mozilla (Firefox), Blink (Chrome and Opera) and WebKit (Safari) to support list types in other languages. See the compatibility table to check which browsers supports which extension.

-moz-ethiopic-halehame
  • Example
-moz-ethiopic-halehame-am
  • Example
ethiopic-halehame-ti-er
-moz-ethiopic-halehame-ti-er
  • Example
ethiopic-halehame-ti-et
-moz-ethiopic-halehame-ti-et
  • Example
hangul
-moz-hangul
  • Example
  • Example
  • Example
hangul-consonant
-moz-hangul-consonant
  • Example
  • Example
  • Example
urdu
-moz-urdu
  • Example

Formal syntax

<counter-style> | <string> | none

where
<counter-style> = <counter-style-name> | symbols()

where
<counter-style-name> = <custom-ident>

Examples

CSS

ol.normal {
  list-style-type: upper-alpha;
}

/* or use the shortcut "list-style": */
ol.shortcut {
  list-style: upper-alpha;
}

HTML

<ol class="normal">List 1
  <li>Hello</li>
  <li>World</li>
  <li>What's up?</li>
</ol>

<ol class="shortcut">List 2
  <li>Looks</li>
  <li>Like</li>
  <li>The</li>
  <li>Same</li>
</ol>

Result

Notes

  • Some types require a suitable font installed to display as expected.
  • The cjk-ideographic is identical to trad-chinese-informal; it exists for legacy reasons.

Specifications

Specification Status Comment
CSS Counter Styles Level 3
The definition of 'list-style-type' in that specification.
Candidate Recommendation Redefines CSS2.1 counters.
Extends the syntax to support @counter-style rules.
Defines using @counter-style the usual style types: hebrew, cjk-ideographic, hiragana, hiragana-iroha, katakana, katakana-iroha, japanese-formal, japanese-informal, simp-chinese-formal, trad-chinese-formal, simp-chinese-formal, trad-chinese-formal,korean-hangul-formal, korean-hanja-informal, korean-hanja-formal, cjk-decimal, ethiopic-numeric, disclosure-open and disclosure-closed.
Extends <counter-style> with the symbols() functional notation.
CSS Lists Module Level 3
The definition of 'list-style-type' in that specification.
Working Draft Modify syntax to support for identifiers used in @counter-style rules to keywords.
Support for a simple <string>.
CSS Level 2 (Revision 1)
The definition of 'list-style-type' in that specification.
Recommendation Initial definition

Browser compatibility

Feature Chrome Edge Firefox Internet Explorer Opera Safari
Basic support 1 12 1 4 3.5 1
arabic-indic No No ? No No No
armenian 1 Yes 1 8 6 1
bengali No No ? No No No
cjk-decimal No No 28 No No No
cjk-earthly-branch No No ? No No No
cjk-heavenly-stem No No ? No No No
cjk-ideographic 1 No 1 No

15

71

?
decimal-leading-zero 1 Yes 1 8 8 1
devanagari No No ? No No No
disclosure-closed No No 33 No No No
disclosure-open No No 33 No No No
ethiopic-numeric No No ? No No No
georgian 1 Yes 1 8 6 1
gujarati No No ? No No No
gurmukhi No No ? No No No
hebrew 1 No 1 No

15

71

?
hiragana 1 No 1 No

15

71

?
hiragana-iroha 1 No 1 No

15

71

?
japanese-formal No No

28

1 -moz-

No No No
japanese-informal No No

28

1 -moz-

No No No
kannada No No ? No No No
katakana 1 No 1 No

15

71

?
katakana-iroha 1 No 1 No

15

71

?
khmer No No ? No No No
korean-hangul-formal No No 28 No No No
korean-hanja-formal No No 28 No No No
korean-hanja-informal No No 28 No No No
lao No No ? No No No
lower-greek 1 Yes 1 8 6 1
lower-latin 1 Yes 1 8 6 1
malayalam No No ? No No No
mongolian No No 33 No No No
myanmar No No ? No No No
oriya No No ? No No No
persian No No ? No No No
simp-chinese-formal No No

28

1 -moz-

No No No
simp-chinese-informal No No

28

1 -moz-

No No No
tamil No No ? No No No
telugu No No ? No No No
thai No No ? No No No
trad-chinese-formal No No

28

1 -moz-

No No No
trad-chinese-informal No No

28

1 -moz-

No No No
upper-latin 1 Yes 1 8 6 1
<string> No No 39 No No No
symbols No ? 35 No No No
Feature Android webview Chrome for Android Edge mobile Firefox for Android IE mobile Opera Android iOS Safari
Basic support Yes Yes 12 4 Yes Yes Yes
arabic-indic ? ? ?

33

4 -moz-

? ? ?
armenian ? Yes Yes 4 ? Yes Yes
bengali ? ? ?

33

4 -moz-

? ? ?
cjk-decimal ? ? ? ? ? ? ?
cjk-earthly-branch ? ? ?

33

4 -moz-

? ? ?
cjk-heavenly-stem ? ? ?

33

4 -moz-

? ? ?
cjk-ideographic ? ? ? ? ? ? ?
decimal-leading-zero ? ? ? ? ? ? ?
devanagari ? ? ?

33

4 -moz-

? ? ?
disclosure-closed ? ? ? ? ? ? ?
disclosure-open ? ? ? ? ? ? ?
ethiopic-numeric ? ? ?

332

4 -moz-

? ? ?
georgian ? Yes Yes 4 ? Yes Yes
gujarati ? ? ?

33

4 -moz-

? ? ?
gurmukhi ? ? ?

33

4 -moz-

? ? ?
hebrew ? ? ? ? ? ? ?
hiragana ? ? ? ? ? ? ?
hiragana-iroha ? ? ? ? ? ? ?
japanese-formal ? ? ? ? ? ? ?
japanese-informal ? ? ? ? ? ? ?
kannada ? ? ?

33

4 -moz-

? ? ?
katakana ? ? ? ? ? ? ?
katakana-iroha ? ? ? ? ? ? ?
khmer ? ? ?

33

4 -moz-

? ? ?
korean-hangul-formal ? ? ? ? ? ? ?
korean-hanja-formal ? ? ? ? ? ? ?
korean-hanja-informal ? ? ? ? ? ? ?
lao ? ? ?

33

4 -moz-

? ? ?
lower-greek ? Yes Yes 4 ? Yes Yes
lower-latin ? Yes Yes 4 ? Yes Yes
malayalam ? ? ?

33

4 -moz-

? ? ?
mongolian ? ? ? ? ? ? ?
myanmar ? ? ?

33

4 -moz-

? ? ?
oriya ? ? ?

33

4 -moz-

? ? ?
persian ? ? ?

33

4 -moz-

? ? ?
simp-chinese-formal ? ? ? ? ? ? ?
simp-chinese-informal ? ? ? ? ? ? ?
tamil ? ? ?

33

4 -moz-

? ? ?
telugu ? ? ?

33

4 -moz-

? ? ?
thai ? ? ?

33

4 -moz-

? ? ?
trad-chinese-formal ? ? ? ? ? ? ?
trad-chinese-informal ? ? ? ? ? ? ?
upper-latin ? Yes Yes 4 ? Yes Yes
<string> ? ? ? ? ? ? ?
symbols No No ? 35 No No No

1. Until version 15, only decimal numbers display.

2. Before Firefox 38, Firefox added a dot as suffix of the number for ethiopic-numeric (for example, ፫. instead of ፫). The specification later defined the absence of a suffix, which Firefox 38 followed.

See also

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type