JSFiddle - React, Tailwind, and code Playground
HTML
<div id="parent">
<p>
Static Element
</p>
</div>
JavaScript
HTMLElement.prototype.appendFirst=function(childNode){
if(this.firstChild)this.insertBefore(childNode,this.firstChild);
else this.appendChild(childNode);
};
var divParent = document.getElementById('parent');
var pFirst = document.createElement('p');
pFirst.innerHTML = 'First Element insert by appendFirst';
divParent.appendFirst(pFirst);