document.body.innerHTML = string_of_html; // Append it instead document.body.innerHTML += string_of_html;