Sorry you do not seem to be understanding me.
Yes I agree <th></th> is correct for cells of the first row of the table HTML. What is missing from the output of LIST_TABLE() for the first row is the <tr></tr> that should envelope that first row.
This is some HTML I am getting from LIST_TABLE()
<table cellpadding="0" cellspacing="0" border="1" ><th> Number </th><th> Surname </th><th> Workplace Name </th><th> First Name </th><th> Number </th><tr><td>
There is no <tr> between
<table cellpadding="0" cellspacing="0" border="1" >
and
<th>
The first row is missing both starting <tr> and closing </tr>