Table generation

Table generation

My goal is to be able to click on a button and create a text with inside a table tag that essentially says

<tr><td>text</td></tr>

But when ever I try to make the code I cant seem to get it right. I have tried .appened(), . write(), ect but I still can't seem to get it right. Is there a road you can set me on to maybe figure this out?