title: Button element not responding
body: <p>Simple question, for some reason this piece of code doesn't work, it's not complicated, but whenever I try to run it in browser it doesn't respond. Is there something I'm missing.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;style&gt;
  
  body {margin: 0; border: 0; padding: 0; background-color: #F3F781;}
  
  #container {height: 100px; padding: 0; border: 0; margin: 0;}
  
  #box1 {width: 100px; height: 100px; padding: 0px; border: 0px; border-radius: 10px; margin: 0px; outline: 0px; background-color: #F5DA81; display: inline-block;}
  
  #box2 {width: 100px; height: 100px; padding: 0px; border: 0px; border-radius: 10px; margin: 0px; outline: 0px; background-color: #58FA58; display: inline-block;}
  
  #box3 {width: 100px; height: 100px; padding: 0px; border: 0px; border-radius: 10px; margin: 0px; outline: 0px; background-color: #58FAD0; display: inline-block;}
  
  #box4 {width: 100px; height: 100px; padding: 0px; border: 0px; border-radius: 10px; margin: 0px; outline: 0px; background-color: #F5A9F2; display: inline-block;}
  
  &lt;/style&gt;
  
  &lt;script&gt;
  
  function write(){
       console.log("hello");
  }   
  
  &lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div id="container"&gt;
      &lt;div id="box1"&gt;&lt;p id="info"&gt;text&lt;/p&gt;
      &lt;/div&gt;
      &lt;div id="box2"&gt;&lt;p&gt;text&lt;/p&gt;
      &lt;/div&gt;
      &lt;div id="box3"&gt;&lt;p&gt;text&lt;/p&gt;
          &lt;/div&gt;
      &lt;div id="box4"&gt;&lt;p&gt;text&lt;/p&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;br&gt;
  
  &lt;div&gt;
  &lt;button onclick="write()"&gt;write&lt;/button&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I may be being a bit dence, but for some reason the button script just wont work. I can't see anything wrong with it at all. Is there something I'm missing.</p>
  
  <p>Thanks for any help, and I'm aware of my low quality questions. I just really am quite stuck on this.</p>