JSFiddle - React, Tailwind, and code Playground
by BramVanroy
HTML
<div style="font-size:12px">Some text</div>
<div style="font-size:1em">Some text 2</div>
<div style="font-size:18px">Some text 3</div>
<div style="font-size:36pt">Some text 4</div>
<div style="font-size:5px">Some text 5</div>
<div style="font-size:1.6em">Some text 6</div>
<div style="font-size:36px">Some text 7</div>
JavaScript
var text,
size = 0;
$("body, body *").each(function(i, val) {
var f_size = parseInt($(this).css("fontSize"));
if (size<f_size) {
text = $(this).text();
size = f_size;
}
console.log(this.tagName + ": " + f_size + "px");
});
console.log("Biggest text: "+ text);