<div class="outer">
  outer text node
  <div class="inner">
    inner text node
    <div class="deep">
      deep text node
    </div>
  </div>
</div>
Result:
<div id="out"></div>
div {
  border:1px solid;
  padding: 0.5rem;
}
let txt = document.querySelector('.outer').textContent;

document.getElementById('out').textContent = txt;

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.