<!doctype html>
<title>Example</title>
<style>
ul {
list-style: none;
counter-reset: nestedCounter;
}
ul li {
counter-increment: nestedCounter;
line-height: 1.4;
ul li:before {
content: counters(nestedCounter, ".") " - ";
font-weight: bold;
</style>
<ul>
<li>Fruit
<li>Apples
<li>Green ones</li>
<li>Red ones</li>
</ul>
</li>
<li>Oranges
<li>Small ones</li>
<li>Big ones</li>
<li>Vegetables
<li>Carrots
<li>Orange ones</li>
<li>Purple ones</li>
<li>Potatoes
<li>Fresh ones</li>
<li>Rotten ones</li>
<li>Fish
<li>Big Ones
<li>Mekong Catfish</li>
<li>Small Ones
<li>Piranha</li>
<li>Gold Fish</li>
<li>Black Molly</li>