Insert Tables - without Markup Dialect

A special feature of AsciiDoc is that tables are part of the standard repertoire. This is not the case in every markup language.

A simple table is created like this:

|===
| Column 1, Row 1 | Column 2, Row 1
| Column 1, Row 2 | Column 2, Row 2
|===

It then looks like this in the output:

This may look a little more complex at first glance, but is actually relatively simple:

  • Use |=== to open and close the table.

  • Each | creates a new cell for the table.

  • A new row in the editor starts a new row in the table.

You can add a heading to the table by adding an empty row in the editor. This turns

|===
| Title 1 | Title 2

| Column 1, Row 1 | Column 2, Row 1
| Column 1, Row 2 | Column 2, Row 2
|===

A table can be designed even further for this purpose. Here are a few helpful parameters that are written in square brackets above the table:

  • frame=all/ends/sides/none Adjusts the outer frame

  • grid=all/cols/rows/none Adjusts the inner frame

All parameters are entered above the table, separated by brackets:

[frame=none, grid=none, ...]
|===
| Title 1 | Title 2

| Column 1, Row 1 | Column 2, Row 1
| Column 1, Row 2 | Column 2, Row 2
|===

This table then looks as follows: