Hello Herman,
thanks for your reply.

The above example has already helped me a lot to get started.
Accessibility requirements for documents are already regulated by EU law and will become punitive from mid-2025. In this context, I need tables that are properly tagged so that they can be read aloud with the appropriate tools (e.g. screen reader). So I am looking for a fitting API. According to the recommendations on the accessibility of PDF files on the Internet I found, tables should be tagged as follows:
<table>
<thead>
<tr>
<th scope="col">Headline 1</>
<th scope="col">Headline 2</>
<th scope="col">Headline 3</>
</tr>
</thead>
</tbody>
<tr>
<th scope="row">Rowline 1</>
<td>ABC</>
<td>CDE</>
</tr>
<tr>
<td scope="row">Rowline 2</>
<td>FGH</>
<td>IJK</>
</tr>
<t/body>
</table>
The scope attribute allows the heading to be read out for each cell.
I have already managed the nested tag structure. However, I can't get the cell contents into the tags (th and td), they are all together still in the table tag <table>. Furthermore, I can't get the scope attribute to work as an attribute.
I test the table structure with the program PAC 2021 (PDF Accessiblity Checker 2021, Button: Logical Structure).
I would be grateful for a few suggestions or examples.
Kind regards
Uwe