JSFiddle - React, Tailwind, and code Playground

HTML

<div>
    <h1 style='text-align:center;'>Centering applied to parent tag</h1>
</div>


<div>
    <h1><span style='text-align:center;'>Spans won't center</span></h1>
</div>

<div>
    <h1><p style='text-align:center;'>P tag centers</p></h1>
</div>