class1.class2", or ".class1Syntax. document.createElement(tagName) tagName The name of the HTML tag you want to create. var divID prompt("Please Name Your New Div Box","") if(divID ! null) document. createElement(false, divID)It could be an intricate job (and not full crossbrowser, I am afraid) to create CSS classes on the fly. The classes are set correctly, but [element].name returns undefined. Howcome and what can I do about it? Thanks Ivo.var rdocument.createElement(tr) var cdocument.createElement(td) var cnc.cloneNode(false) cn. classNametdname cn.