<html>
<body>
<div id="mydiv">hello div world</div>
<pre id="mypre">
hello
pre
world
</pre>
<script>
console.log("div content: "+document.getElementById("mydiv").innerHTML)
console.log("pre content: "+document.getElementById("mypre").innerHTML)
</script>
</body>
</html>