JSFiddle - React, Tailwind, and code Playground

HTML

<h1>This is a test</h1>
<p></p>
<p></p>
<p></p>
<p></p>


<h1>To look like this</h1>
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>

CSS

p:nth-of-type(n):after
{
    content: n;
}