<ul>
  <li>xxxxx</li>
  <li>xxxxx</li>
  <li>xxxxx
    <ul>
      <li>yyyyy</li>
      <li>yyyyy</li>
      <li>yyyyy</li>
    </ul>
  </li>
  <li>xxxxx</li>
  <li>xxxxx</li>
<ul>  
ul {
  counter-reset: li-count;
}

li {
  counter-increment: li-count;                 
}

li::before {
  content: counter(li-count) " : ";                  
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.