Ok guys. So, I have a div element that will be dynamically populated in the dom already. On a click of a button, I will generate an expression and then I want to put it into that div. The whole expression is wrapped in a bunch of <table> <tr> <td> expression </td> </tr> </table> elements. How to generate these partial html fragments and put them in correct location of the dom.