JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<body>
<div class="mark-first">My <strong>first</strong> word</div>
<div>Nothing to see here!</div>
</body>
</html>
CSS
div.mark-first span {
color: red;
}
div.mark-first strong {
font-weight: bold;
}
JavaScript
$('div.mark-first').each(function(){
var me = $(this);
me.html(me.html().replace(/^(\w+)/, '<span>$1</span>'));
});