title: How to select all div from body and not from the header?
body: <p>I use this javascript code in order to select all DIVs and change their color. I don't want to change color of the DIV in the header. Purpose of this task is to learn HTML5, DOM, Javascript and getElementsByTagName function:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"/&gt;
      &lt;title&gt;test&lt;/title&gt;
      &lt;div&gt;divv in header&lt;/div&gt;
  &lt;/head&gt;
  &lt;body onload="Onload()"&gt;
      &lt;div&gt;bla&lt;/div&gt;
      &lt;div id="Div1"&gt;bla&lt;/div&gt;
      &lt;div id="Div2"&gt;bla
          &lt;div id="Div4"&gt;div in div&lt;/div&gt;
      &lt;/div&gt;
      &lt;div id="Div3" class="diiiivvv"&gt;bla&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  
  &lt;script type="text/javascript"&gt;
      function Onload() {
          var h = document.head;
          var dh = h.getElementsByTagName('div');
          if (dh.length != 0) {
              dh[0].style.backgroundColor = 'red'; //fail
          }            
  
          var d = document.getElementsByTagName('div');
  
          for (var i = 0; i &lt; d.length; i++) {
              d[i].style.backgroundColor = 'blue';
          };
      }
  &lt;/script&gt;
  </code></pre>