JSFiddle - React, Tailwind, and code Playground
by Akram kamal
HTML
<p>John Ipsum rule britannia lorem fish and chips ipsum going to the loo cheers mate crumpets mate off to the pub good day John harry potter cup of tea cup of tea crumpets God save the queen jolly good show rule britannia cheerio! bangers and mash going to the loo arse cheers John cheers mate bloody hell crumpets harry potter bangers and mash hello chaps fish and chips harry potter bollocks toodle pip fish and chips cup of tea off to the pub cheers mate arse tosser knackered ron weasley tosser toodle pip toodle pip fish and chips God save the queen bloody hell rule britannia bollocks John bangers and mash bangers and mash ron weasley</p>
CSS
span{
color: red;
font-size: 10px;
font-family: sans-serif;
}
JavaScript
var john = $('p').text().replace(/John/g,"<span>John</span>");
$('p').html(john);