Table Syntax and Attribute Reference

Attribute Description Value Description Notes

cols

comma-separated list of column specifiers

specifiers

see cols for details

format

data format of the table’s contents

psv

cells are delimited by separator (default |) (aka prefix-separated values)

dsv

cells are delimited by a colon (:) (aka delimiter-separated values)

csv

cells are delimited by a comma (,) (aka comma-separated values)

tsv

cells are delimited by a tab character (aka tab-separated values)

separator

character used to separate cells

|

default for top-level tables

!

default for nested tables

user-defined

any sequence of literal characters (e.g., ¦ or ][). Ideally a pattern not found in the cell content.

frame

draws a border around the table

all

border on all sides (default)

topbot

border on top and bottom

none

no borders

sides

border on left and right sides

grid

draws boundary lines between rows and columns

all

draws boundary lines around each cell (default)

cols

draws boundary lines between columns

rows

draws boundary lines between rows

none

no boundary lines

align

horizontally aligns table within page width

left

aligns to left side of page (default)

Not yet implemented in Asciidoctor. Applies to HTML output only. The align and float attributes are mutually exclusive.

right

aligns to right side of page

center

horizontally aligns to center of page

float

floats the table to the specified side of the page

left

floats the table to the left side of the page (default)

Applies to HTML output only. Must be used in conjunction with the table’s width attribute to take effect. The float and align attributes are mutually exclusive.

right

floats the table to the right side of the page

halign

horizontally aligns all of the cell contents in a table

left

aligns the contents of the cells to the left (default)

Not implemented in Asciidoctor. Define instead using column or cell specifiers (e.g., 3*>), which take precedence over this value.

right

aligns the contents of the cells to the right

center

aligns the contents to the cell centers

valign

vertically aligns all of the cell contents in a table

top

aligns the cell contents to the top of the cell (default)

Define instead using column or cell specifiers (e.g., 3*.>), which take precedence over this value.

bottom

aligns the cell contents to the bottom of the cell

middle

aligns the cell contents to the middle of the cell

orientation

rotates the table

landscape

rotated 90 degrees counterclockwise

Equivalent to setting the rotate option, which is preferred. DocBook only.

options

comma separated list of option names

header

promotes first row to the table header

header and footer rows are omitted by default

footer

promotes last row to the table footer

breakable

allows the table to split across a page (default)

Mutually exclusive. DocBook only (specifically for generating PDF output).

unbreakable

prevents the table from being split across a page

autowidth

disables explicit column widths (ignores cols attribute)

rotate

Prints the table in landscape

Equivalent to setting the orientation to landscape. DocBook only.

width

the table width relative to the available page width

user defined value

a percentage value between 0% and 100%