JSFiddle - React, Tailwind, and code Playground
HTML
<div id="div1"><div class="a"> Hi this is sachin tendulkar </div></div>
<div id="div2"><div class="a"> Hi this is sachin tendulkar </div></div>
<div id="div3"><div class="a"> Hi this is sachin tendulkar3 </div></div>
<div id="div4"><div class="a"> Hi this is sachin tendulkar4 </div></div>
JavaScript
if($('#div1').html() == $('#div2').html())
alert('div1 & div2 is the same');
else
alert('div1 & div2 is different');
if($('#div3').html() == $('#div4').html())
alert('div3 & div4 is the same');
else
alert('div3 & div4 is different');