JSFiddle - React, Tailwind, and code Playground

HTML

<div id="idd">
<h4>Newton's Laws of Motion</h4>
<p><span class="inline_title">Law No.1</span>: <span class="caption">An object at rest will remain at rest, and an object in motion will continue to move at constant velocity, unless a net force is applied.</span></p>
<ul>Consequences: <li>Conservation of Momentum in both elastic and inelastic collisions</li>
<li>Conservation of kinetic energy in elastic collisions but not inelastic.</li>
<li>Conservation of angular momentum.</li>
</ul>
<h5>Equations</h5>
<p class="equation">&rho; = mv</p>
<p>where &rho; is the momentum,title and m is the mass of an object moving at constant velocity v.</p>
    <img title="ee"/>
</div>

JavaScript

var regEx = new RegExp("(?![^<>]*>)title", 'gi');
var a =document.getElementById('idd');
a.innerHTML = a.innerHTML.replace(regEx, '<a href="#">teasasasasa</a>');