title: Why Vue.js needs to be add in the body tag
body: <p>I added my vue.js in the header but it has an error that says <strong>element root can't be found</strong>, because I have a div with an id of <strong>root</strong>.</p>
  
  <p>But when I add it on the body everything works fine.</p>
  
  <p>This is my js code.</p>
  
  <pre><code>new Vue({
       el: '#root'
  });
  </code></pre>
  
  <p>And this is my html.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Title&lt;/title&gt;
   
      &lt;script src="https://unpkg.com/vue@2.1.3/dist/vue.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div id="root"&gt;
  
      &lt;task-list&gt;
  
  
      &lt;/task-list&gt;
  
  
  &lt;/div&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>