title: What Is A Text Node, Its Uses? //document.createTextNode()
body: <p>So I've been slowly replacing a lot of my normal jQuery code with native javascript, and I happened upon the <code>document.createTextNode()</code> and <a href="https://developer.mozilla.org/en-US/docs/Web/API/document.createTextNode">related MDN documentation</a>.  After reading I'm somewhat confused what a text node is.  </p>
  
  <p>I understand it can be used to put text inside <code>div</code>'s, but I'm sure there's a bit more to it than just "use it to put words inside elements".  <a href="https://developer.mozilla.org/en-US/docs/Web/API/Text">Looking at this,</a> it appears a text node can also refer to the text of attributes as well.</p>
  
  <p>Can anyone provide a bit more of a definition of what a text node is and what it's used for?  Are there practical uses for this other than basic stuff like this?</p>
  
  <pre><code>var div = document.createElement('div');
  var text = document.createTextNode('Y HALO THAR');
  div.appendChild(text);
  </code></pre>