What HTML is
An HTML table is a table element containing thead and tbody, with th cells for headers and td cells for data.
Web pages, email templates and anything pasted into a CMS.
What PDF is
PDF describes a page: glyphs at coordinates, not rows and columns. A table in a PDF is a visual arrangement, not a data structure.
Reports, invoices, statements and anything sent to be read rather than processed.
What changes when you convert HTML to PDF
The first table in the markup is used. Cell contents are stripped of inline tags and entities are decoded, so <td><b>Total</b> </td> arrives as Total. Nested tables inside a cell are not descended into.
The table is drawn into a paginated document with the header repeated on every page, so a long table stays readable past page one. Page size, orientation and font size are all adjustable.
What carries over from HTML to PDF
HTML records 3 things about a table that PDF has no way to hold.
HTML can hold a value that is itself a list or an object. PDF has only flat cells, so nested values are flattened into one cell rather than being spread across columns.
Nothing in PDF records that the first row is a header. It is drawn at the top and looks like one, which is all that is left of the distinction.
PDF is the end of the line for this data. Reading the table back out of it is a separate and much harder problem than writing it, so keep the HTML if you will need the values again.