title: TypeError: Cannot Set property 'onclick' of null
body: <p>html below</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"/&gt;
      &lt;title&gt;Stopwatch&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;p&gt;&lt;span id="seconds"&gt;00&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;span id ="tens"&gt;00&lt;/span&gt;&lt;/p&gt;
      &lt;button id="start"&gt;Start&lt;/button&gt;
      &lt;button id="stop"&gt;Stop&lt;/button&gt;
      &lt;button id="reset"&gt;Reset&lt;/button&gt;
      &lt;script src="main.js"&gt;&lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>javascript below </p>
  
  <pre><code>window.onload = function () {
    var seconds = 0
    var tens = 0
    var getTens = document.getElementById('tens')
    var getSeconds = document.getElementById('seconds')
    var start = document.getElementById('Start')
    var stop = document.getElementById('Stop')
    var reset = document.getElementById('Reset')
    var interval
    start.onclick = function () {
      clearInterval(interval)
      interval = setInterval(startTimer, 10)
    }
  
    stop.onclick = function () {
      clearInterval(interval)
    }
  
    reset.onclick = function () {
      clearInterval(interval)
      tens = '00'
      seconds = '00'
      getTens.innerHTML = tens
      getSeconds.innerHTML = seconds
    }
  
    function startTimer() {
      tens++
      if (tens &lt; 9) {
        getSeconds.innerHTML = '0' + tens
      }
      if (tens &gt; 9) {
        getTens.innerHTML = tens
      }
      if (tens &gt; 99) {
        console.log('seconds')
        seconds++
        getSeconds.innerHTML = '0' + seconds
        tens = 0
        getTens.innerHTML = '0' + 0
      }
      if (seconds &gt; 9) {
        getSeconds.innerHTML = seconds
      }
    }
  }
  </code></pre>
  
  <p>I am getting this (main.js:11 Uncaught TypeError: Cannot set property 'onclick' of null
      at window.onload) error in console and cannot figure out why. I have tried multiple other solutions including moving the  tag in the HTML as I have seen that helped others however I cannot get it.</p>