Skip to main content

13.9.8 Tables in HTML export

The HTML export back-end uses org-html-table-default-attributes when exporting Org tables to HTML. By default, the exporter does not draw frames and cell borders. To change for this for a table, use the following lines before the table in the Org file:

#+CAPTION: This is a table with lines around and between cells
#+ATTR_HTML: :border 2 :rules all :frame border

The HTML export back-end preserves column groupings in Org tables (see Column Groups) when exporting to HTML.

Additional options for customizing tables for HTML export.

org-html-table-align-individual-fields​

Non-nil attaches style attributes for alignment to each table field.

org-html-table-caption-above​

Non-nil places caption string at the beginning of the table.

org-html-table-data-tags​

Opening and ending tags for table data fields.

org-html-table-default-attributes​

Default attributes and values for table tags.

org-html-table-header-tags​

Opening and ending tags for table’s header fields.

org-html-table-row-tags​

Opening and ending tags for table rows.

org-html-table-use-header-tags-for-first-column​

Non-nil formats column one in tables with header tags.