how to add div inside div using javascript at first child code example
Example: append element in a div as first child
ParentNode.insertBefore(<your element>, ParentNode.firstChild);
ParentNode.insertBefore(<your element>, ParentNode.firstChild);