CSS Properties: How to set the different type list style
Solution:
HTML Code:
Explanation:
- This HTML document demonstrates how to set different types of list styles using CSS.
- CSS comments are added to explain each section of the code.
- Different classes are defined for ordered lists (ol) and unordered lists (ul) to apply different list styles.
- list-style-type property is used to specify the type of list marker for each list class.
- Ordered lists:
- ol.w3r has decimal-leading-zero style.
- ol.w3r1 has upper-alpha (uppercase alphabetic) style.
- ol.w3r2 has lower-roman (lowercase Roman numerals) style.
- Unordered lists:
- ul.w3r3 has square bullet style.
- ul.w3r4 has circle bullet style.
- ul.w3r5 has disc bullet style.
Live Demo:
See the solution in the browser
Supported browser
![]() |
![]() |
![]() |
![]() |
![]() |
Yes | Yes | Yes | Yes | Yes |
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics