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:
circlediscsquare
The following constants describe the numbering format for ordered list items:
decimaldecimal-leading-zerolower-romanupper-romanhebrewgeorgianarmeniancjk-ideographichiraganakatakanahiragana-irohakatakana-iroha
The following constants display letters instead of numbers in ordered lists:
lower-alphaorlower-latinupper-alphaorupper-latinower-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;
}
Copyright © 2006 of the German translation, dpunkt.verlag GmbH
You may print the online version for your private use.
Otherwise, this chapter from “CSS − Anspruchsvolle Websites mit Cascading Stylesheets” is subject to the same conditions as the bound edition: the work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
dpunkt.verlag GmbH, Ringstraße 19, 69115 Heidelberg