<!DOCTYPE html>
<html>
<head>
<style>
#div-id {
background-color: cornflowerblue;
width: 70px;
height: 20px;
padding: 10px;
}
</style>
</head>
<body>
<div id="div-id">div tag</div>
<p id="p-id"></p>
<script>
var txt = document.getElementById("div-id").childNodes[0].nodeValue;
document.getElementById("p-id").innerHTML = txt;
/*
run:
div tag
*/
</script>
</body>
</html>