You can add IDs for tables that you can use in your own HTML code. In addition to this, the name of the table style is exported to HTML as the table's class attribute.
You can add captions with counter variables to tables with the caption tool in Write > Insert Object:
This tool inserts captions that are independent from the table, so that they can be inserted above, below or even in the table. They can be included in the tables of figures generated for PDF and Word DOCX output and they can also be referenced with both text references like See Table xxx and hyperlinks. See Figure and table counters for details.
To give a table a CSS class you just need to define a table style and apply it to the table. The style name is exported as the class attribute of the <table> tag.
If you enter a table style name with one or more spaces in it, the table will have two or more style classes in HTML-based output, which is supported in CSS. The first class name is used by Help+Manual. You can use the additional classes in your own CSS in your HTML templates to define global style rules for only those tables with this class attribute.
The table properties dialog has an optional ID field. An ID you enter here will be exported as the <table> tag ID attribute in HTML-based output formats. You will not need this for normal tables but it is sometimes useful. For example, when you use the sortable tables option in the Help+Manual Premium Pack you need to enter a special ID here to identify your table as sortable.
Table ID for table counters and captions
The table ID is not used for referencing the counters used for numbering tables and including them in the table of tables. You need to use the ID in the figure caption described in Figure and table counters for that.