I want to create an ordered list that looks like this:
1. Item_1
2. Item_2:
a. Subitem_1
b. Subitem_2:
I. Sub-Subitem_1
II. Sub-Subit
This is certainly possible, given the following HTML:
- Item_1
- Item_2:
- Subitem_1
- Subitem_2:
- Sub-Subitem_1
- Sub-Subitem_2
- Subitem_3
- Item 3
And the CSS:
ol {
list-style-type: decimal;
}
ol > li > ol {
list-style-type: lower-alpha;
}
ol > li > ol > li > ol {
list-style-type: upper-roman;
}
JS Fiddle demo.
Or, you can be less strict about the specificity of the CSS selectors:
ol {
list-style-type: decimal;
}
ol ol {
list-style-type: lower-alpha;
}
ol ol ol {
list-style-type: upper-roman;
}
JS Fiddle demo.
References: