Add bracket around the numbers for ordered list <OL> - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Element

Description

Add bracket around the numbers for ordered list <OL>

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <title>Lorem ipsum </title> 
  <style>
ol {<!--from   ww w.  ja va2 s  .  co m-->
   list-style:none;
   counter-reset:array;
}

ol li:before {
   counter-increment:array;
   content:"[" counter(array) "] ";
}
</style> 
 </head> 
 <body translate="no"> 
  <ol> 
   <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. </li> 
   <li>Lorem ipsum dolor sit amet, consec</li> 
   <li>Lorem ipsum dolor sit amet, cons</li> 
   <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit. </li> 
   <li>Lorem ipsum dolor sit amet, consec</li> 
   <li>Lorem ipsum dolor sit amet, cons</li> 
  </ol>  
 </body>
</html>

Related Tutorials