JSFiddle - React, Tailwind, and code Playground

HTML

<h1>
  Hello H1
</h1>
<div>
<h1>
  Hello H2
</h1>
</div>
<script>
  window.onload = function() {
    var getH1 = document.getElementsByTagName('h1');
    alert('<h1> will be deleted');
    getH1.remove();
  }

</script>