Well to answer your question every table MUST have a <tbody> tag. If it is not explicitly defined it will implicitly create one for you.

Here is a little javascript snippet that will help you with your coding.
function createTable()
{
// create the new table tag
var table = document.createElement("table");
// create the new table body tag
var tbody = document.createElement("tbody");
// create the new table row tag
var tr = document.createElement("tr");
// create the new table definition tag
var td = document.createElement("td");
// create the new tag of your choice to go into the tag.
var text = document.createElement("textarea");
// create the outer tr to go around the newly created table
var OuterTR = document.createElement("tr");
// create the outer td to go around the newly created table
var OuterTD = document.createElement("td");
// append tags accordingly.
td.appendChild(text);
tr.appendChild(td);
tbody.appendChild(tr);
table.appendChild(tbody);
OuterTD.appendChild(table);
OuterTR.appendChild(OuterTD);
var myTable = document.getElementById("tbody");
myTable.appendChild(OuterTR);
}
Then all you have to have is a table described in your html. IE:
<html>
<head>
</head>
<body>
<table>
<tbody id='tbody'>
</tbody>
</table>
</body>
</html>