Hi Heena,
You can use counters to do so. The following style sheet numbers nested list items as "1", "1.1", "1.1.1", etc.
The Simple Example:
ol { counter-reset: item }
li{ display: block }
li:before { content: counters(item, ".") " "; counter-increment: item }
<ol>
<li>Products
<ol>
<li>Clothes</li>
<li>Accessories</li>
<li>Footwear</li>
</ol>
</li>
<li>Products - 2</li>
<li>Products - 3
<ol>
<li>Clothes</li>
<li>Accessories</li>
<li>Footwear</li>
</ol>
</li>
</ol>