title: An error occur when I use appendChild ("<br>") in a genuine exist reference
body: <p>This is a beginner's question...</p>
  
  <p>I want to write some code to initialize a bunch of seats picture in my web page,</p>
  
  <p>create and set attribute to them,
  and make them change line every 9 seats (4 rows, and for every row it has 9 seats), here is the code</p>
  
  <pre><code>function initSeats() {
  
              var seatsDiv = document.getElementById("seats");
  
              //Initialize the appearence of all seats
              for (var i = 0; i &lt; seats.length; i++) {
                  for (var j = 0; j &lt; seats[i].length; j++) {
                      var currentSeatIndex = i * seats[i].length + j;
                      if (seats[i][j]) {
                          //if current seat is available(true), create a new IMG element and set some attributes;
                      } else {
                          //if current seat is unavailable(true), create a new IMG element and set some attributes;
                      }
                  }
                  seatsDiv.appendChild("&lt;br&gt;");//here is the problem
              }
          }
  </code></pre>
  
  <p>what I want to do is when one of the outer loop finished, add a <BR> at the end,</p>
  
  <p>But then I got a "NotFoundError" in Chrome that looks like the node seatsDiv doesn't exist</p>
  
  <p>so after all only one row of seats were successfully initialized.</p>
  
  <p>Is appendChild supposed to append anything at the position? Or should I use some other method?</p>