HTML CSS examples for CSS Widget:UL Element
<p> tag inside <li> tag with counter based on counter-reset
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #test {<!--from w w w .j a v a 2s . co m--> counter-reset:continuous-counter; } li.continuous-list { list-style-type:none; counter-increment:continuous-counter; } li.continuous-list:before { content:"(" counter(continuous-counter)") "; } ol li p { display:inline; } </style> </head> <body> <div id="test"> <ol> <li class="continuous-list">Lorem ipsum </li> <li class="continuous-list"> <p>Lorem ipsum</p> </li> </ol> <ol> <li class="continuous-list">Lorem ipsum </li> <li class="continuous-list">Lorem ipsum </li> </ol> </div> </body> </html>