how to appendChild in the begin of the div javascript

JavaScript
$("button").click(function(){
  $("p").append("<b>Appended text</b>");
});//create and append element
 var node = document.createElement("LI");                 // Create a <li> node

 var textnode = document.createTextNode("Water");         // Create a text node

 node.appendChild(textnode);                              // Append the text to <li>

 document.getElementById("myList").appendChild(node);     // Append <li> to <ul> with id="myList" var element = document.getElementById("div1");
element.insertBefore(para, element.firstChild);
Source

Also in JavaScript: