JSFiddle - React, Tailwind, and code Playground

HTML

<div class="title">HTML text in the title::separated with separator </div>

JavaScript

var text = $('.title').html().split('::'),
    newText = text[0] + '<b>' + text[1] + '</b>';
     
$('.title').html(newText);