I\'m trying to use the code below to dynamically add closing tag followed by opening so that i creates a new row every three cells. Almost working, DOM inspector shows a T
As lonesomeday said, you can't treat a DOM like a bit of HTML. Besides, TR closing tags are optional so when you insert some markup with an opening TR, the browser will close it. You don't need a closing tag.