css counter reset
<!DOCTYPE html>
<html>
<head>
<style>
body{
counter-reset: myCounter; /* Resets myCounter to 0 */
}
h2::before{
counter-increment: myCounter; /* Increments myCounter by 1 */
content: counter(myCounter) ": ";
}
</style>
</head>
<body>
<h1>CSS counter-reset Property</h1>
<h2>This is a heading</h2>
<h2>This is a heading</h2>
<h2>This is a heading</h2>
<h2>This is a heading</h2>
<h2>This is a heading</h2>
</body>
</html>