Adding parentheses in HTML ordered list - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:OL

Description

Adding parentheses in HTML ordered list

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
ol {<!--  w ww.  jav a 2s.c  o m-->
   list-style-type:none;
}

li:before {
   content:"(" counter(section, lower-alpha) ") ";
}

li {
   counter-increment:section;
}
</style> 
 </head> 
 <body> 
  <ol> 
   <li>Some text</li> 
   <li>Some text</li> 
   <li>Some text</li> 
   <li>Some text</li> 
  </ol>  
 </body>
</html>

Related Tutorials