Another solution:

var td = document.create Element('td');
td.colSpan = 5; // for example