There are various ways to do this so, as suggested by @F_ES Sitecore, my suggestion is also to look for different solutions and pick that which best suits to your requirement.
A simple way to do this can be like-
var elementBlockToBeAdded="<header id="headerClass"><div class="loader"><div class="title">Loading...</div><div class="load"><div class="bar"></div></div></div></header>";
$("body").append(elementBlockToBeAdded);
Hope, it helps :)