CSS Property: list-style-type
[this page | pdf | back links]
The CSS (CSS1) list-style-type property identifies the
type of list-item marker used for a specified list.
Valid property values
(other than inherit
and initial) are:
Value
|
Description
|
armenian
|
Armenian numbering
|
circle
|
A circle
|
cjk-ideographic
|
Plain ideographic
numbers
|
decimal
|
A number
|
decimal-leading-zero
|
A number with leading
zeros (i.e. 01, 02, … if reaches beyond 9 but not beyond 99
|
disc
|
(default value). A
filled circle
|
georgian
|
Georgian numbering
|
hebrew
|
Hebrew numbering
|
hiragana
|
Hiragana numbering
|
hiragana-iroha
|
Hiragana iroha
numbering
|
katakana
|
Katakana numbering
|
katakana-iroha
|
Katakana iroha
numbering
|
lower-alpha
|
I.e. a, b, c, …
|
lower-greek
|
I.e. lower case greek, α,
β, γ, …
|
lower-latin
|
I.e. a, b, c, …
|
lower-roman
|
I.e. i, ii, iii, …
|
none
|
No marker
|
square
|
Square marker
|
upper-alpha
|
I.e. A, B, C, …
|
upper-latin
|
I.e. A, B, C, …
|
upper-roman
|
I.e. I, II, III, …
|
Default Value:
|
disc
|
JavaScript syntax:
|
e.g. object.style.listStyleType="decimal"
|
Inherited:
|
Yes
|
Animatable:
|
No
|
EXAMPLE:
HTML USED IN THIS EXAMPLE:
<!DOCTYPE html>
<html> <!-- Copyright (c) Nematrian Limited 2018 -->
<head>
<style>
div {width: 50px; border: 1px dotted black;}
.x1 {list-style-type: decimal;}
</style>
</head>
<body>
Element with default property<br>
<ul><li>x1</li><li>x2</li></ul>
Property set using in-file HTML style<br>
<ul class="x1"><li >x1</li><li>x2</li></ul>
Property set using JavaScript<br>
<ul id="x2"><li>x1</li><li>x2</li></ul>
<script>
document.getElementById("x2").style.listStyleType = "decimal";
</script>
</body>
</html>
|
FUNCTION THAT MAY ASSIST IN TESTING WHETHER FEATURE IS SUPPORTED:
function isSupportedCSSPropertyListStyleType() {
var x = document.createElement("DIV"); x.style.listStyleType = "decimal"; return (window.getComputedStyle(x, null).listStyleType == "decimal");
} |
NAVIGATION LINKS
Contents | Prev | Next | CSS Properties