XML technologies / CSS / Advanced websites with CSS / CSS property reference / list-style-type

(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)

The property list-style-type describes the type of marker used in a list. It can be applied to actual list elements (li) and to any other elements whose property display is declared as list-item.

Inherited: Yes

See also: list-style, list-style-image

Values

The following constants describe typical list symbols used as markers. They are used for unordered lists:

  • circle

  • disc

  • square

The following constants describe the numbering format for ordered list items:

  • decimal

  • decimal-leading-zero

  • lower-roman

  • upper-roman

  • hebrew

  • georgian

  • armenian

  • cjk-ideographic

  • hiragana

  • katakana

  • hiragana-iroha

  • katakana-iroha

The following constants display letters instead of numbers in ordered lists:

  • lower-alpha or lower-latin

  • upper-alpha or upper-latin

  • ower-greek

The constant none suppresses the list marker.

Default value: none (Note: This default applies to elements that are not declared as list-item. For list items, browsers generally use disc as list-style-type for unordered lists and decimal as list-style-type for ordered lists. Most browsers also have their own defaults for nested lists.)

Compatibility

CSS version: 1 (language-specific constants since CSS2)

Works in all CSS-capable browsers, most of which limit support to the CSS1 constants circle, disc, square, lower-alpha, upper-alpha, lower-roman, upper-roman and none.

Netscape 4 for Macintosh does not correctly support the value none — question marks are displayed as list markers.

Example

The following style rules produce different markers at different list levels:

ul {
 list-style-type: square;
 list-style-image: none;
}
ul ul {
 list-style-type: circle;
}
ul ul ul {
 list-style-type: disc;
}

  

 

 

 

back to top