With HTML and CSS, can I achieve this?
1.
1.1
1.2
2.
2.1
2.2
using <li>
and <ul>
tags?
Ordered list starts with the <ol> tag. The list item starts with the <li> tag and will be marked as numbers, lowercase letters uppercase letters, roman letters, etc. The default numbers for list items. For creating an ordered list with numbers, use the <ol> tag attribute type.
There can be different types of numbered list: Numeric Number (1, 2, 3) Capital Roman Number (I II III) Small Romal Number (i ii iii)
Answer: Type attribute allows us to change the style of numbers in an ordered list. Explanation: The < li > tag includes two attributes – type and value. The type attribute is used to modify the order numbering in the list item.
For CSS-compliant browsers you could use:
ul { counter-reset:item; }
ul > li { counter-increment:item; }
ul > li:before {content: counter(item); }
ul > li > ul { counter-reset:subitem; }
ul > li > ul > li { counter-increment:subitem; }
ul > li > ul > li:before { content: counter(item) "." counter(subitem); }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With