<div id="div_1">HTML Код</div> <div id="div_2"></div>
document.getElementById('div_2').innerHTML = document.getElementById('div_1').innerHTML;
<div id="div_1"><span>HTML</span> <b>код</b></div> <div id="div_2"></div> <script> var html = div_1.innerHTML; div_2.appendChild(document.createTextNode(html)); </script>