list-style-type
The list-style-type CSS property sets the marker [such as a disc, character, or custom counter style] of a list item element.
The color of the marker will be the same as the computed color of the element it applies to.
Only a few elements [
- or
- ] to make it apply to all list items.
Syntax
The list-style-type property may be defined as any one of:
- a value
- a symbols[] value
- a value
- the keyword none.
Note that:
- 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.
Values
A identifier matching the value of a @counter-style or one of the predefined styles:
symbols[]Defines an anonymous style of the list.
The specified string will be used as the item's marker.
noneNo item marker is shown.
discA filled circle [default value].
circleA hollow circle.
squareA filled square.
decimalDecimal numbers, beginning with 1.
cjk-decimalHan decimal numbers.
decimal-leading-zeroDecimal numbers, padded by initial zeros.
lower-romanLowercase roman numerals.
Uppercase roman numerals.
lower-greekLowercase classical Greek.
lower-alpha, lower-latinLowercase ASCII letters.
upper-alpha, upper-latinUppercase ASCII letters.
arabic-indic, -moz-arabic-indicArabic-Indic numbers.
armenianTraditional Armenian numbering.
bengali, -moz-bengaliBengali numbering.
cambodian/khmerCambodian/Khmer numbering.
cjk-earthly-branch, -moz-cjk-earthly-branchHan "Earthly Branch" ordinals.
cjk-heavenly-stem, -moz-cjk-heavenly-stemHan "Heavenly Stem" ordinals.
cjk-ideographicIdentical to trad-chinese-informal.
devanagari, -moz-devanagariDevanagari numbering.
ethiopic-numericEthiopic numbering.
georgianTraditional Georgian numbering.
gujarati, -moz-gujaratiGujarati numbering.
gurmukhi, -moz-gurmukhiGurmukhi numbering.
Traditional Hebrew numbering
hiraganaDictionary-order hiragana lettering.
hiragana-irohaIroha-order hiragana lettering
japanese-formalJapanese formal numbering to be used in legal or financial documents. The kanjis are designed so that they can't be modified to look like another correct one.
japanese-informalJapanese informal numbering.
kannada, -moz-kannadaKannada numbering.
katakanaDictionary-order katakana lettering
katakana-irohaIroha-order katakana lettering
korean-hangul-formalKorean hangul numbering.
korean-hanja-formalFormal Korean Han numbering.
korean-hanja-informalKorean hanja numbering.
lao, -moz-laoLaotian numbering.
lower-armenian *Lowercase Armenian numbering.
malayalam, -moz-malayalamMalayalam numbering.
mongolianMongolian numbering.
myanmar, -moz-myanmarMyanmar [Burmese] numbering.
Oriya numbering.
persian , -moz-persianPersian numbering
simp-chinese-formalSimplified Chinese formal numbering.
simp-chinese-informalSimplified Chinese informal numbering.
tamil , -moz-tamilTamil numbering.
telugu, -moz-teluguTelugu numbering.
thai, -moz-thaiThai numbering.
tibetan *Tibetan numbering.
trad-chinese-formalTraditional Chinese formal numbering.
trad-chinese-informalTraditional Chinese informal numbering.
upper-armenian *Traditional uppercase Armenian numbering.
disclosure-openSymbol indicating that a disclosure widget such as is opened.
disclosure-closedSymbol indicating that a disclosure widget, like 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
- -moz-ethiopic-halehame-am
- ethiopic-halehame-ti-er, -moz-ethiopic-halehame-ti-er
- ethiopic-halehame-ti-et, -moz-ethiopic-halehame-ti-et
- hangul, -moz-hangul
- hangul-consonant, -moz-hangul-consonant
- urdu, -moz-urdu
Accessibility concerns
The VoiceOver screen reader has an issue where unordered lists with a list-style-type value of none applied to them will not be announced as a list. To address this, add a zero-width space as pseudo content before each list item to ensure the list is announced properly. This ensures the design is unaffected by the bug fix and that list items are not improperly described.
- VoiceOver and list-style-type: none Unfettered Thoughts
- MDN Understanding WCAG, Guideline 1.3 explanations
- Understanding Success Criterion 1.3.1 | W3C Understanding WCAG 2.0
Formal definition
disc |
list items |
yes |
as specified |
discrete |
Formal syntax
where
= | symbols[]
where
=
Examples
Setting list item markers
HTML
CSS
Result
All list style types
HTML
CSS
JavaScript
Result
Specifications
CSS Lists Module Level 3 [CSS Lists 3] # text-markers |
CSS Counter Styles Level 3 [CSS Counter Styles 3] # extending-css2 |
Browser compatibility
BCD tables only load in the browser
See also
- list-style, list-style-image, list-style-position