JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<div>Remove Me</div>
<body>
<p>Keep Me</p>
</body>
<div>Remove Me</div>
</html>
JavaScript
$("html div").remove();
<html>
<div>Remove Me</div>
<body>
<p>Keep Me</p>
</body>
<div>Remove Me</div>
</html>
$("html div").remove();