That's not actually a DOM invariant, just something the HTML parser refuses to build. You can still construct table-less th and td elements using the DOM API.