title: Changing a div with javascript
body: <p>I already fail at a seemingly basic task in javascript - changing a div's content by a script. Please help me understand where I am going wrong. Here is a minimal example that's not working for me:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;script&gt;
              document.getElementById('id').innerHTML = "test";
          &lt;/script&gt;
  
      &lt;/head&gt;
  
      &lt;body&gt;
          &lt;div id="id" &gt;blub&lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>