Contents [show] |
Tables
Tables can be used to display tabular data, or to format text into columns.
Syntax
| column | column
|| column span
|\ row span
The first | must be the first character on a new line.
Complex formatting can be achieved using the column span (| followed by an extra | for every column joined) and row span (| followed by \ for every row joined). The | character is known as the 'pipe' character.
Examples
- Wiki Text -
| a table cell | another cell | | the second row | another cell | |\ a cell spanning rows | another cell | | another cell | || spanning columns |
- Formatted Text -
a table cell | another cell |
the second row | another cell |
a cell spanning rows | another cell |
another cell | |
spanning columns |
- Wiki Text -
| tables without borders | column 2 | row 2 column 1 | text here is aligned to the previous line
- Formatted Text -
tables without borders | column 2 |
row 2 column 1 | text here is aligned to the previous line |
- Wiki Text -
|`yellow' black text on yellow |`yellow' `blue blue text on yellow' |
- Formatted Text -
black text on yellow | blue text on yellow |
Details
Tables are always stretched to be the width of the page. They cannot be placed inside a paragraph. Even though the examples on this page have their columns aligned, this is not necessary and has only been done to enhance readability.
Apart from displaying tabular data, tables can also be used to align text into multiple columns on the page, when used without borders.
Formatting cells
You can change the background colour of cells in a table by enclosing the colour in and ' and placing it immediately after the | character.
See also
Categories: Help | Syntax