JSFiddle - React, Tailwind, and code Playground

HTML

<p id='txt'>Can i put it here?</p>
<input id='btn' type="submit" value='REMOVE THAT!!!'></input>

JavaScript

var btn = document.getElementById('btn');
btn.onclick = function () {
    document.getElementById('txt').remove();
    this.remove();
};