var img = document.createElement("img"); img.src = "http://www.google.com/intl/en_com/images/logo_plain.png"; var src = document.getElementById("header"); src.appendChild(img);
<div id="header"></div> Run code snippet