Trying to create a styled HTML list with CSS that resembles the following:
1. List item
2. List item
3. List item
3. List item
3. List item
4. List item
4. List item
2. List item
2. List item
1. List item
1. List item
2. List item
1. List item
Experimenting with different methods in CSS to achieve the desired list appearance without current numbering displayed:
ul {
counter-reset: section;
list-style-type: none;
}
li:before {
color: red;
counter-increment: section;
content: counters(section, ".") " ";
}
<ul>
<li>LIST ITEM</li>
<li>
<ul>
<li>LIST ITEM</li>
<li>
<ul>
<li>LIST ITEM</li>
<li>LIST ITEM</li>
</ul>
</li>
<li>LIST ITEM</li>
</ul>
</li>
<li>LIST ITEM</li>
<li>
<ul>
<li>LIST ITEM</li>
<li>LIST ITEM</li>
<li>LIST ITEM</li>
<li>LIST ITEM</li>
</ul>
</li>
<li>LIST ITEM</li>
</ul>