<div id="h1a" style="display: none;"><h1>Война и мир</h1></div>
<div id="h1c"></div>
<script>
var a = document.getElementById("h1a").innerHTML;
var b = a.split('> ');
for (var i = 0; i < b.length; i++) {
var replaceBracket = i == b.length - 1 ? "" : ">";
document.getElementById("h1c").textContent += b[i] + replaceBracket + "\r\n";
}
</script>