title: Why i couldn't append a child node to the document object model directly?
body: <p>While studying the Document object model today, I faced a problem of appending a newly created child on the document object directly,
  here is my code : </p>
  
  <pre><code>var newEl=document.createElement("textarea");
  document.appendChild(newEl);
  </code></pre>
  
  <p>the resulted error is : </p>
  
  <blockquote>
    <p>Uncaught DOMException: Failed to execute 'appendChild' on 'Node': Only one element on document allowed.</p>
  </blockquote>
  
  <p>I know the solution is to either append it to <strong>document.body</strong> or <strong>document.documentElement</strong> , but I didn't find a <strong>reference</strong> pointing that the mentioned way is not correct for a specific reason.</p>
  
  <p>accept my apologies for being a beginner.</p>