I recently added some new BBCodes to allow tables to be nicely formatted on the page. Preciously the only way to actually build a table was to use
code tags. The new tags are a bit basic and need to be laid out on one line, but they do work, so I might as well document them here.
Here is a quick example of a table:
Column One | Column Two |
[col]Alpha[/col][col]Beta[/col]
[col]Gamma[/col][col]Delta[/col]
And here is the BBCode that created it:
Code: Select all
[table] [row][head]Column One[/head][head]Column Two[/head][/row] [row][col]Alpha[/col][col]Beta[/col][/row] [row][col]Gamma[/col][col]Delta[/col][/row] [/table]
Each cell of the table is enclosed in either
head or
col tags - head giving the white on blue heading style. Sets of cells are grouped into rows using the
row tag around all the cells in the row. Finally the whole thing is enclosed in a
table tag.
Another quick example with the column values centred (at the request of Brian H) and right-justified:
Column One | Column Two |
Alpha | Beta |
Gamma | Delta |
And here is the BBCode:
Code: Select all
[table][row][head]Column One[/head][head]Column Two[/head][/row] [row][col=center]Alpha[/col][col=right]Beta[/col][/row] [row][col=center]Gamma[/col][col=right]Delta[/col][/row][/table]
I will try, at some point, to make the background of the table body alternate in colour to make it more readable - useful for reading off part numbers etc.
Cheers R.