listStyleType style property
Specifies or returns the style of the list marker bullet or numbering system within a list.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
CSS page for this property: list-style-type |
Possible values:
The type of this property is string.
One of the following values:
Arabic indic digits. | |||||||
Bengali digits. | |||||||
Cjk earthly digits. | |||||||
Cjk heavenly digits. | |||||||
Devanagari digits. | |||||||
Ethiopic digits. | |||||||
Ethiopic digits. | |||||||
Ethiopic digits. | |||||||
Ethiopic digits. | |||||||
Ethiopic digits. | |||||||
Gujarati digits. | |||||||
Gurmukhi digits. | |||||||
Hangul digits. | |||||||
Hangul consonant digits. | |||||||
Japanese formal digits. | |||||||
Japanese informal digits. | |||||||
Kannada digits. | |||||||
Khmer digits. | |||||||
Lao digits. | |||||||
Malayalam digits. | |||||||
Myanmar digits. | |||||||
Oriya digits. | |||||||
Persian digits. | |||||||
Simple chinese formal digits. | |||||||
Simple chinese informal digits. | |||||||
Tamil digits. | |||||||
Telugu digits. | |||||||
Thai digits. | |||||||
Chinese formal digits. | |||||||
Chinese informal digits. | |||||||
Urdu digits. | |||||||
Armenian digits. | |||||||
Outlined circles. | |||||||
Cjk ideographic digits. | |||||||
1, 2, 3, 4, and so on. Default for ol elements. | |||||||
0, 1, 2, 3, and so on. | |||||||
Solid circles. Default for ul elements. | |||||||
Georgian digits. | |||||||
Hebrew digits. | |||||||
Hiragana digits. | |||||||
Hiragana iroha digits. | |||||||
Takes the value of this property from the computed style of the parent element. | |||||||
Katakana digits. | |||||||
Katakana iroha digits. | |||||||
a, b, c, d, and so on. | |||||||
Lower-greek digits. | |||||||
Lower latin digits. | |||||||
i, ii, iii, iv, and so on. | |||||||
No marker is shown. | |||||||
square | |||||||
A, B, C, D, and so on. | |||||||
Upper latin digits. | |||||||
I, II, III, IV, and so on. |
Default: disc.
Example HTML code 1:
This example illustrates the use of the list-style-type property:
|
||||
<body> <ol style="list-style-type: square;"> <li>square <li>list <li>type </ol> <ol style="list-style-type: circle;"> <li>circle <li>list <li>type </ol> </body> |
||||
|
||||
Did you find this example helpful?
|
Example HTML code 2:
This example illustrates the use of the listStyleType property in JavaScript:
|
||||
<head> <script type="text/javascript"> function ChangeListStyle (selectTag) { // Returns the index of the selected option var whichSelected = selectTag.selectedIndex; // Returns the selected options values var listValue = selectTag.options[whichSelected].text; var oList = document.getElementById ("myOlist"); oList.style.listStyleType = listValue; } </script> </head> <body> <ol id="myOlist"> <li>Apple <li>Pear <li>Peach </ol> <br /> <select onchange="ChangeListStyle (this);" size="9"> <option />none <option />circle <option selected="selected" />disc <option />decimal <option />lower-roman <option />lower-alpha <option />square <option />upper-roman <option />upper-alpha </select> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
Related pages:
External links:
list-style-type (MSDN)
list-style-type (Mozilla Developer Center)
list-style-type (Safari Reference Library)
list-style-type (W3C)
list-style-type (Mozilla Developer Center)
list-style-type (Safari Reference Library)
list-style-type (W3C)
User Contributed Comments