Javascript Reference
Categories: STYLE

javascript STYLE listStyleType

@March 15, 2008, 1:22 a.m.
listStyleTypeFirefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 2  

Read/Write  

Specifies the kind of item marker to be displayed with each item. This attribute is applied only if listStyleImage is none (or not specified). The constant values available for this attribute are divided into two categories. One set is used with ul elements to present a filled disc, an empty circle, or a filled square (except empty square on IE 4 for Macintosh). The other set is for ol elements, which has list items that can be marked in sequences of arabic numerals, roman numerals (uppercase or lowercase), letters of the alphabet (uppercase or lowercase), and some other character sequences of other languages if the browser and operating system supports those languages.

 
Example
 
document.getElementById("itemList").style.listStyleType = "circle";
 
Value

One constant value as a string that is relevant to the type of list container. For ul: circle | disc | square. For ol: decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-alpha | lower-latin | upper-alpha | upper-latin | hebrew | armenian | georgian | cjk-ideographic | hiragana | katakana | hiragana-iroha | katakana-iroha. Commonly-supported ol element sequences are treated as shown in the following table.

 
TypeExample
decimal1, 2, 3, ...
decimal-leading-zero01, 02, 03, ...
lower-alphaa, b, c, ...
lower-greek, , , ...
lower-romani, ii, iii, ...
upper-alphaA, B, C, ...
upper-romanI, II, III, ...
 
Default

disc (for ul); decimal (for ol).


Powered by Linode.