<div>
<h2>皮卡丘</h2>
<h2>小火龍</h2>
<h2>妙蛙種子</h2>
</div>
div{
  counter-reset:num;
}
h2::before {
  counter-increment:num; 
  content:counter(num) '. ';
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.