Help:Tables

Worthless table
Writing...

produces:

You can also write...

for the same result.

Slightly proficient table
You can add  to the start of a table, like...

creates...

Another slightly proficient table
Writing...

produces:


 * If you want to apply style attributes to only a row, write  for the corresponding row-break  e.g..
 * If you want to apply it to a single cell, write  with a pipe  succeeding it; all of this is written after the double pipes  that create the cell in question and before the text of the cell, e.g.   if you want to apply attributes to the cell "E".

Pre-defined tables
Two types of table are predefined in Wiki CSS.

Wikitable
This is the table that you will be seeing forever. Admire its beauty as it is the table that you will most likely to creating.

Attributes
Additional parameters can be used on these tables to change background color, font size, padding etc. Use a colon to determine an attribute and write every element of the attribute within its quotation marks   e.g.   to assign the red color for that table. Some of these also work for text outside tables, but you can check that in Help:Wikitext. It is recommended to end every property with a semicolon e.g.


 * determines the text alignment within the cells (does not affect the header or title  rows).
 * options:,   or
 * default:


 * determines the width of the cells.
 * units:,   or
 * default:


 * determines the height of the cells.
 * units:  or
 * default:


 * determines the height between text lines.
 * units:,  ,   or
 * default:


 * ,  determines the background-color of the cells (does not affect the header  or title  rows).
 * default:
 * colors: Help:Colors


 * determines the color of the text within the cells.
 * colors: Help:Colors
 * default:


 * determines the size of the font within the cells.
 * units:,   or
 * default:

Collapsing tables
Tables can be created to be "collapsed" i.e. hidden until  on the header is clicked (with   you collapse it again). Adding  to   within the quotation marks  i.e.   produces:

Using only  will not automatically collapse the table, but will add a button to do so.

Collapsed tables
To create a collapsible table that is by default collapsed, add  to   within the quotation marks  i.e.  :

Any other formatting can be included:

"collapsible autocollapse" will collapse tables after the first two.

"remembercollapse"
"collapsible remembercollapse" and "collapsible collapsed remembercollapse" will remember the state of the table and restore it when the page is reloaded. You must give the table a unique id if you use "remembercollapse", thus:  {| class="infobox collapsible collapsed remembercollapse" id="example" border="1" cellpadding="0" cellspacing="0" style="line-height:15px; :margin-left:auto;margin-right:20%; clear:both; width:60%; border: 2px solid grey; text-align:left;font-size:70%;" ! Header
 * Content which starts hidden
 * more hidden content
 * }
 * Produces:
 * }
 * Produces:

(reload the page after "showing" the two examples above to see the difference)

Sortable tables
Tables can be made to "sort":

or more concisely but exactly equivalent:


 * Either of the above will produce:

All columns of the table will be sorted into the (ascending/descending) order of the column on which the little "><" symbol in the top row is clicked. (click once for ascending, a second time for descending)

Merging cells
You can merge (fusion) cells horizontally (left-to-right) with  and vertically (top-to-bottom) with. Within the quotation marks, you can specify the number of cells to be merged.

For example, writing...

produces:

You can also combine  with , using both while separating them with whitespace. Example:

yields:

In HTML
Tables can be written in wikitalk. It is not advisable to create tables in HTML, as HTML tables are harder to maintain than wikitext tables. Unfortunately, you can do this:

This produces the 3 x 3 table:

(Sneaky way to create a table: With Dreamweaver or some similar prog design your table there & copy/paste the code into your page.)

Janitors can clean away HTML tables by using a HTML to wikitext converter.