The <th> element is effectively a <td> element but used as a table header. See
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead.
However, I have found that the line numbering in the Save functionality in the editor often gives me a completely wrong number offset from the real problem, so it might be referring to a different line. You might be able to find this offset by putting a bad tag at the top line after <pdf> and see what line number it gives you. That is more likely than the line you showed being the actual problem.