Help:Tables

Tables can be used to organize a variety of data.

Table markup
Tables are always started using  and ended with. A column header of a table is made using. A standard cell of a table is made with. For cells, each new one will move to the right one cell in the current row. A row break is made with. Each of these should have a line break between them in the editor. For example: makes

Table modifiers
Tables can be modified using classes. Each of these should be inside a table after the initial  by typing By adding all of these modifiers to the table from before, this is produced:
 * wikitable (Makes the table have the standard background and borders. Should be used on most tables.)
 * mw-collapsible (Makes the table collapsible. Useful on large tables. Put  (without the space) at the end of the last column to avoid overlap with the   button.)
 * mw-collapsed (Makes the table collapsed. Should only be used alongside . Can be used with one cell and without   to make hidden content.
 * sortable (Makes the table sortable by column alphabetically. Use  to make a specific column unsortable.)

Table colors
Different colors of tables can be used for different subjects. They are used by adding  (replacing color with the appropriate value) in the class statement The table colors by subject are as follows:

Rowspan and colspan
A more advanced aspect of tables is rowspan and colspan. These are added to individual cells. They are made by typing  (or  ) after the | or ! that defines the cell, but before the content of it. x is the number of cells that the single cell should stretch across. Rowspan causes it to stretch vertically, and colspan causes it to stretch horizontally.