{{=TABLE(THEAD(TR([TH(c) for c in colnames])),
[TR(row) for row in rows])}}
The above already produces a table (that's what the TABLE
helper does), so you are wrapping one table element inside another -- that is, the HTML will look like:
<table class="myTable">
<table><thead><tr><th>...
</table>
</table>
Instead, just add the "myTable" class to the TABLE
helper:
{{=TABLE(THEAD(TR([TH(c) for c in colnames])),
[TR(row) for row in rows],
_class='myTable')}}