Help:Tables tutorial
From Nomicapolis
In the Mediawiki engine a table is created as follows:
{| and |} is the respective start and end of a table.
|- indicates a new row.
| indicates a new cell within the row.
Example 1:
| A | B |
| C | D |
is created by:
{|
|-
| A
| B
|-
| C
| D
|}
Another way to add cells to a row is by placing each cell on the same line and add another | between the cells.
Example 2:
| 1 | 2 |
| 3 | 4 |
is made by:
{|
|-
| 1 || 2
|-
| 3 || 4
|}
To include a caption in a table, use |+ on it's own line after {|
Example 3:
| Column 1, Row 1 | Column 2, Row 1 |
| Column 1, Row 2 | Column 2, Row 2 |
is made by:
{|
|+ Table Caption
|-
| Column 1, Row 1 || Column 2, Row 1
|-
| Column 1, Row 2 || Column 2, Row 2
|}
It may be better to show cell borders so user may tell when one cell ends and another begins. This can be done by applying a format modifier to the table. If format for the entire table is to modified, the code will be placed on the same line following the table caller {| The code to be used to display a border around each cell, as well as around the table itself is: border="1"
Example 4:
| cell 1 | cell 2 |
| cell 3 | cell 4 |
is made using the following:
{| border="1"
|+ This is the table caption
|-
| cell 1 || cell 2
|-
| cell 3 || cell 4
|}
More soon to come. In the meantime, see http://meta.wikimedia.org/wiki/Help:Table for more information.
