Answers for "css counter reset"

0

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>
Posted by: Guest on September-06-2021

Browse Popular Code Answers by Language