JSFiddle - React, Tailwind, and code Playground
HTML
<p id="myFragment">
<i>F</i>RAGMENT <big><i>with italics</i> and </big> withOUT.
</p>
JavaScript
$('#myFragment').parent().css('font-style','italic');
$('#myFragment *').each(function(){
if ($(this).prop('tagName')=='I')
$(this).css('font-style','normal');
});
alert( $('#myFragment').html() );