title: Javascript created button wont display in HTML
body: <p>I have created a countdown timer(almost) using HTML and Javascript. I use Javascript to create a text input and a button (to start timer).</p>
  
  <p>However when I run the page the output is just two text text input boxes and I cant for the life of me figure it out. I have tried the page in different browsers with the same result. As a test I also tried to make the button the first element and it still displays as a text input.</p>
  
  <p>I used a debugger and when it shows the HTML (as created by javascript) it shows two  items without any closing  tags. I am not sure if thats how the debugger displays created elements or if the closing tags are actually missing when I create the input element using Javascript.</p>
  
  <p>I have attached: my HTML page, Javascript code snippet related to creating elements, and the related snippet of the HTML output as shown in the debugger.</p>
  
  <p>I appreciate any help as I am at a loss.</p>
  
  <p>HTML: </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;title&gt;JavaScript - CountDown&lt;/title&gt;
      &lt;style type="text/css"&gt;
    body {
      font-family: sans-serif;
      color: #333;
    }
  
    #container {
      width: 400px;
      margin: auto;
    }
  &lt;/style&gt;
   &lt;/head&gt;
  
   &lt;body&gt;
   &lt;div id="container"&gt;
   &lt;div id="inputArea"&gt;
  &lt;/div&gt;
  
  &lt;h1 id="time"&gt;0:00 &lt;/h1&gt;
   &lt;/div&gt;
  
   &lt;script src="script.js"&gt; &lt;/script&gt;
   &lt;/body&gt;
   &lt;/html&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>// as soon as page is loaded
  window.onload = function () {
  //create input text box and give it a name of 'minutes'
  var inputMinutes = document.createElement("input");
  inputMinutes.setAttribute = ("id", "minutes");
  inputMinutes.setAttribute = ("type", "text");
  
  //create a button
  var startButton = document.createElement("input");
  startButton.setAttribute = ("type", "button");
  startButton.setAttribute = ("value", "Start Countdown");
  
  startButton.onclick = function () {
      startCountdown();
  };
  
  // add to the DOM to div called inputArea
  document.getElementById("inputArea").appendChild(inputMinutes);
  document.getElementById("inputArea").appendChild(startButton);
  };
  </code></pre>
  
  <p>HTML Output as per the debugger:</p>
  
  <pre><code>&lt;body&gt;
  &lt;div id="container"&gt;
  &lt;div id="inputArea"&gt;
  &lt;input&gt;
  &lt;input&gt;
  &lt;/div&gt;
  &lt;h1 id="time"&gt;0:00 &lt;/h1&gt;
  &lt;/div&gt;
  </code></pre>