title: How to add a line break after a text node after an input element in javascript
body: <p>I've seen different answers on Stack Overflow, but none seem to work!</p>
  
  <p>Here is the code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var input1 = document.createElement("input");
  var input2 = document.createElement("input");
  var input3 = document.createElement("input");
  input1.setAttribute("type","checkbox");
  input2.setAttribute("type","checkbox");
  input3.setAttribute("type","checkbox");
  var br = document.createElement("br");
  var text1 = document.createTextNode("option1");
  var text2 = document.createTextNode("option2");
  var text3 = document.createTextNode("option3");
  var se = document.getElementById("container");
  input1.appendChild(text1);
  input2.appendChild(text2);
  input3.appendChild(text3);
  se.appendChild(input1);
  se.appendChild(br);
  se.appendChild(input2);
  se.appendChild(input3);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body&gt;
      &lt;form&gt;
        &lt;div id="container"&gt;
        &lt;/div&gt;
        &lt;br /&gt;
      &lt;/form&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>What I'm trying to obtain is the checkbox corresponding to each input element to display vertically on top of each other with their text to the right and a line break right at the end of each line. I want to avoid using display: block for input elements in CSS.</p>