how to change tag name in js html

HTML
 var p = document.getElementsByTagName("P")[0];

document.renameNode(p, null, "h1");

Source

Also in HTML: