JSFiddle - React, Tailwind, and code Playground

by yudizsolutions

HTML

<html>

<head>
  <style type="text/css">
    body {
      counter-reset: section;
    }

    p.section {
      counter-reset: subsection;
    }

    p.section:before {
      counter-increment: section;
      content: ""counter(section) ".0"": ";
      counter-reset: subsection;
    }

    p.subsection:before {
      counter-increment: subsection;
      content: ""counter(section) "."counter(subsection) ": ";
    }
  </style>
</head>

<body>
  <p class="section">Paragraph should be 1.0</p>
  <p class="section">Paragraph should be 2.0</p>
  <p class="subsection">Paragraph should be 2.1</p>
  <p class="subsection">Paragraph should be 2.2</p>
  <p class="section">Paragraph should be 3.0</p>
  <p class="section">Paragraph should be 4.0</p>
  <p class="subsection">Paragraph should be 4.1</p>
</body>

</html>