CSS Reference

Quick Reference

The list-style-type specifies the type of list-item marker in a list.

ul {
    list-style-type: square;
}
  • Item 1
  • Item 2
  • Item 3
ol {
    list-style-type: lower-alpha;
}
  1. Item 1
  2. Item 2
  3. Item 3

Default

Default valuedisc
Inherited valuesyes
Can it be animated?no

These are the allowed values.

ValueDescription
discThe marker is a filled circle (default on unordered lists)
armenianThe marker is traditional Armenian numbering
circleThe marker is a circle
cjk-ideographicThe marker is plain ideographic numbers
decimalThe marker is a number (default on ordered lists)
decimal-leading-zeroThe marker is a number with leading zeros (01, 02, 03, etc.)
georgianThe marker is traditional Georgian numbering
hebrewThe marker is traditional Hebrew numbering
hiraganaThe marker is traditional Hiragana numbering
hiragana-irohaThe marker is traditional Hiragana iroha numbering
katakanaThe marker is traditional Katakana numbering
katakana-irohaThe marker is traditional Katakana iroha numbering
lower-alphaThe marker is lower-alpha (a, b, c, d, e, etc.)
lower-greekThe marker is lower-greek
lower-latinThe marker is lower-latin (a, b, c, d, e, etc.)
lower-romanThe marker is lower-roman (i, ii, iii, iv, v, etc.)
noneNo marker is shown
squareThe marker is a square
upper-alphaThe marker is upper-alpha (A, B, C, D, E, etc.)
upper-greekThe marker is upper-greek
upper-latinThe marker is upper-latin (A, B, C, D, E, etc.)
upper-romanThe marker is upper-roman (I, II, III, IV, V, etc.)
initialSets this property to its default value
inheritInherits this property from its parent element

Using JavaScript

The HTML element can also be styled using JavaScript and the element’s id.

document.getElementById('my_ul').style.listStyleType = 'square';
<button onclick='my_function()'>Click Here</button>

<script>
function my_function() {
    document.getElementById('my_ul').style.listStyleType = 'square';
}
</script>

CSS Notes:


We’d like to acknowledge that we learned a great deal of our coding from W3Schools and TutorialsPoint, borrowing heavily from their teaching process and excellent code examples. We highly recommend both sites to deepen your experience, and further your coding journey. We’re just hitting the basics here at 1SMARTchicken.