JSFiddle - React, Tailwind, and code Playground

by du liu

HTML

<ul> 
    <li>XiaoMi</li> 
    <li>HuaWei</li> 
    <li>IphoneX</li> 
    <li>Iphone7</li> 
</ul> 

<table>
  <tr>
    <td>XiaoMi</td>
  </tr>
    <tr>
    <td>HuaWei</td>
  </tr>
    <tr>
    <td>IphoneX</td>
  </tr>
    <tr>
    <td>Iphone7</td>
  </tr>
</table>

CSS

ul { 
   list-style-type:none;         
   counter-reset:sectioncounter; 
}                       
ul li:before { 
   content: counter(sectioncounter) ". ";  
   counter-increment:sectioncounter; 
} 

table {        
   counter-reset:sectioncounter; 
}                       
table td:before { 
   content: counter(sectioncounter) ". ";  
   counter-increment:sectioncounter; 
}