title: appendChild + createElement
body: <p>What's the difference between:</p>
  
  <pre><code>var div = document.createElement('div');//output -&gt; [object HTMLDivElement]
  
  document.getElementById('container').appendChild(div);
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>var div = '&lt;div&gt;&lt;/div&gt;';
  
  document.getElementById('container').appendChild(div);//output -&gt; &lt;div&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Shouldn't both be the same? And if not, how do I get the second version to work?</p>