HTML CSS examples for CSS Widget:UL Element
Create multi-level lists with counter
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> ul.numeric {<!-- ww w .j a v a2s . c o m--> counter-reset:section; list-style-type:none; } ul.numeric li { list-style-type:none; } ul.numeric li ul { counter-reset:subsection; } ul.numeric li:before { counter-increment:section; content:counter(section) ". "; } ul.numeric li ul li:before { counter-increment:subsection; content:counter(section) "." counter(subsection) " "; } </style> </head> <body> <ul class="numeric"> <li>Lorem i <ul> <li>Lorem i</li> <li>Lorem i</li> </ul> </li> <li>Lorem ip <ul> <li>Lorem </li> <li>Lorem </li> </ul> </li> <li>Lorem i <ul> <li>Lorem </li> <li>Lorem </li> <li>Lorem </li> <li>Lorem </li> </ul> </li> <li>Lorem ip <ul> <li>Lorem </li> <li>Lorem </li> </ul> </li> <li>Lore</li> </ul> </body> </html>