JSFiddle - React, Tailwind, and code Playground
HTML
<div class="sectionA"><p>sfadfafdafdafdaf</p></div>
CSS
.sectionA { background-color: cyan; }
JavaScript
var $s = $(".sectionA").empty();
var chars = $s.text().length;
$('<p>').text(chars + ' characters in the div.')
.appendTo('body');