Inserrt a table cell
<html> <head> <title>Build-o-Table</title> <script type="text/javascript"> function procImage() { var tbl = document.getElementById('table1'); tbl.border="5px"; tbl.cellPadding="5px"; var row1 = tbl.insertRow(-1); var cell1 = row1.insertCell(0); var cell2 = row1.insertCell(1); var txtAttr1 = document.createTextNode("src"); cell1.appendChild(txtAttr1); } </script> <body onload="procImage();"> <table id="table1"> <tr><td>adsf</td></tr> </table> </body> </html>