title: how to add style in table which is dynamically created
body: <p>how to add border into my table which table is dynamically generated..here is the code..</p>
  
  <pre><code>var table = document.createElement('table');
  for (var i = 1; i &lt; 4; i++){
      var tr = document.createElement('tr');   
  
      var td1 = document.createElement('td');
      var td2 = document.createElement('td');
  
      var text1 = document.createTextNode('Text1');
      var text2 = document.createTextNode('Text2');
  
      td1.appendChild(text1);
      td2.appendChild(text2);
      tr.appendChild(td1);
      tr.appendChild(td2);
  
      table.appendChild(tr);
  }
  document.body.appendChild(table); 
  </code></pre>
  
  <p>Now how can i add style on my table.I wanted to give border in it.</p>