Writerside Help

Tables

Use the <table> element to add a table, <tr> for table rows, and <td> for row cells. For Markdown tables, see Tables in Markdown.

You can start typing table or press Ctrl+J to bring up the list of live templates and insert a table with three rows and three columns.

The table live template

The <table> element has the following attributes:

style

Define the location of the table header, which is used to label data in a table. Possible values are:

  • header-row is the default value, which renders the table with a header row at the top

  • header-column renders the table with a header column on the left

  • both renders both a header row and a header column

  • none renders a table without headers

Here are some examples:

Column Name

Column Name

Column Name

Lorem ipsum dolor sit amet

Consectetur adipiscing elit

Mauris feugiat euismod sapien at iaculis

Row Name

Lorem ipsum dolor sit amet

Consectetur adipiscing elit

Row Name

Mauris feugiat euismod sapien at iaculis

Sed vel turpis quam

Both

Column Name

Column Name

Row Name

Lorem ipsum dolor sit amet

Consectetur adipiscing elit

Row Name

Mauris feugiat euismod sapien at iaculis

Sed vel turpis quam

Consectetur adipiscing elit.

Lorem ipsum dolor sit amet.

Mauris feugiat euismod sapien at iaculis

Sed vel turpis quam

id

Specify a unique identifier to use as a link anchor and generate a meaningful URL for this table. You can reference and reuse any element that has an ID.

filter

Define a set of custom filters for conditionally including this table.

instance

Define a set of instances for conditionally filtering this table.

switcher-key

Make this table switchable depending on the selected key.

The <td> element for table cells also has the following attributes:

colspan

Specify the number of columns a cell should span.

rowspan

Specify the number of rows a cell should span.

sorted

Sort the table rows by data in the column with this cell. Make sure that the data in the column is comparable, like numbers or words (to sort alphabetically). Possible values are:

  • none is the default value, which renders table rows in the order in which they are defined

  • asc sorts table rows in ascending order (from lowest to highest)

  • desc sorts table rows in ascending order (from highest to lowest)

width

Set the column width in pixels or percent.

Tables in Markdown

For simple tables in a Markdown file, use hyphens --- to separate the header row, and pipes | to separate each column.

| Foo | Bar | Baz | |--------|--------|----------| | One | Two | Three | | Higher | Faster | Stronger |

Alternatively, press Alt+Insert to open the Insert menu, and then select Table to generate a Markdown table of any size.

Insert table in Markdown

Markdown tables have certain limitations. For example, they must always have a header row, you can't break lines in cells, you can't span a cell across multiple rows or columns. If you need a more complex table, use the semantic <table> element.

Convert Markdown table to semantic markup

  • With the caret inside the table, press Alt+Enter and select Convert Markdown table to XML format.

    Convert Markdown table to XML
Last modified: 18 September 2023