// assume we have a <p> element with the id "text" const text = document.getElementById("text") text.innerHTML = "<h1>hey</h1>" // now it's a <h1> element