-
insertBefore(); inserts an element before another element
var ourDiv=document.getElementByID("ourDiv");
var para = document.getElementByID("newPara");
var newHeading=document.getElementById("h1");
var hText=document.createTextNode("New Heading");
newHeading.appendChild(hText);
ourDiv.insertBefore(newHeading, para)