JSFiddle - React, Tailwind, and code Playground

HTML

<div id="target">
    <p>Some text</p>
    <p>More text here</p>
    <p>two words</p>
    <p>one</p>
    <p></p>
</div>
<p>Forever alone text</p>

CSS

span
{
    color:#f00;
}

JavaScript

$("#target p").each(function(){
  $(this).html($(this).text().replace(/^([^\s]+)\s?/, '<span>$1</span> '));
});