Please enable JavaScript to view this site.

Navigation: Basic Working Procedures > Working with Tables

Table Counters, Captions and CSS

Scroll Prev Top Next More

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.

Table counters and captions, table of tables

You can add captions with counter variables to tables with the caption tool in Write > Insert Object:

figure_caption

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.

Table CSS classes

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.

Table IDs

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 weblink Premium Pack you need to enter a special ID here to identify your table as sortable.

You may also need to use IDs in tables if you are planning to manipulate your tables with your own CSS or JavaScript code and need to address an individual table instead of a class of similar tables, for which you would use a CSS class (see above).

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.