title: Why does getElementById not work on elements inside the document element?
body: <p>If you use <code>getElementById</code> to with document like - <code>document.getElementById</code> then it always works. </p>
  
  <p>But however, if we perform the same on an element say <code>x</code> like <code>x.getElementById</code>, then it returns an error. </p>
  
  <p>The unusual thing about this is that <code>getElementsByClassName</code> and <code>getElementsByTagName</code> work on the elements however <code>getElementById</code> doesn't!</p>