title: I cannot find what is wrong with my code
body: <p>I cannot find out why the first button in the div on this code does not work on HTML files.
  I have checked many javaScript and HTML validators but none of them work.
  on codecademy.com and w3schools.com it works but not on HTML files.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
   &lt;head&gt;
    &lt;style&gt;
     #b1 {
          background-image: url('http://images2.fanpop.com/image/photos/14600000/egypt-egyptian-history-14635051-430-287.jpg');
          background-repeat: no-repeat;
          background-size: cover;
      }
  
      div {
          width: 990px;
          padding: 25px;
          border: 2px solid navy;
          margin: 25px;
      }
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body id="b1"&gt;
   &lt;script&gt;
      var b = 0;
      var a = function () {
          var q = "blah"
          document.getElementById('r').innerHTML = q;
      };
  
      var g = function () {
          location.reload();
      };
      var ab = function () {
          var p = "blah";
          document.getElementById('r').innerHTML = p;
      };
      var aq = function () {
          var an = "blah";
          document.getElementById('r').innerHTML = t;
      };
      var di = function () {
          var pe = "blah";
          document.getElementById('r').innerHTML = pe;
      };
      var e = true;
      var a = function () {
          if (e === true) {
              e = false;
              document.getElementById('a').innerHTML = "Ancient Egypt";
          }
          else {
              e = true;
              document.getElementById('a').innerHTML = "Erik Low\'s";
          }
  
      }
      setInterval(function () { a(); }, 4000);
  &lt;/script&gt;&lt;center&gt;
      &lt;div style="background:white" id="r"&gt;
  
          &lt;h1&gt;Ancient Egypt&lt;/h1&gt;
          &lt;h2&gt;Achievements&lt;/h2&gt;
          &lt;hr /&gt;
          &lt;button onclick="a();"&gt;Pyramids&lt;/button&gt;&lt;br /&gt;&lt;br /&gt;
          &lt;button onclick="ab();"&gt;The Sphinx&lt;/button&gt;&lt;br /&gt;&lt;br /&gt;
          &lt;button onclick="aq();"&gt;Writing&lt;/button&gt;&lt;br /&gt;&lt;br /&gt;
          &lt;button onclick="v();"&gt;Mummification&lt;/button&gt;&lt;br /&gt;&lt;br /&gt;
          &lt;button onclick="di();"&gt;Valley Of The Kings&lt;/button&gt;&lt;br /&gt;&lt;br /&gt;
      &lt;/div&gt;
  &lt;/center&gt;
  </code></pre>
  
  <p>
  </p>