Make counter for ordered list with letters digits and numbers - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Element

Description

Make counter for ordered list with letters digits and numbers

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
.A ol {
   list-style:none;
   counter-reset:chapter 2;<!--from  ww w  .j  a v a2s  .com-->
}

.A ol li+li {
   counter-increment:chapter 2;
   list-style:none;
}

.A ol li:before {
   content:"a" counter(chapter) ". ";
}

.B ol {
   list-style:none;
   counter-reset:chapter 2;
}

.B ol li+li {
   counter-increment:chapter 2;
   list-style:none;
}

.B ol li:before {
   content:"b" counter(chapter) ". ";
}
</style> 
 </head> 
 <body> 
  <title>Lorem ipsum dolor sit amet, consect</title> 
  <div class="A"> 
   <ol> 
    <li>Lorem ipsum do</li> 
    <li>Lorem ipsum</li> 
    <li>Lorem ipsum dolor</li> 
    <ol> 
    </ol> 
   </ol> 
  </div> 
  <div class="B"> 
   <ol> 
    <li>Lorem ipsum do</li> 
    <li>Lorem ipsum</li> 
    <li>Lorem ipsum dolor</li> 
    <ol> 
    </ol> 
   </ol> 
  </div>  
 </body>
</html>

Related Tutorials