xxxxxxxxxx
var tr = document.getElementById('table').tHead.children[0];
tr.insertCell(1).outerHTML = "<th>Second</th>" // some browsers require the index parm -- 1
xxxxxxxxxx
var table = document.createElement("TABLE")
var row = table.insertRow(0);
row.insertCell(0).outerHTML = "<th>First</th>"; // rather than innerHTML
xxxxxxxxxx
var tr = document.getElementById('table').tHead.children[0],
th = document.createElement('th');
th.innerHTML = "Second";
tr.appendChild(th);