var h = document.getElementById("myH2"); h.insertAdjacentHTML("afterend", "<p>My new paragraph</p>");