Template:Election table/doc

Usage
This template marks the beginning of a table and defines borders, margins, background colours, and text alignment within the table. (Default alignment is "right", others must be specified.) Table rows and cells are written as usual, and the table is closed with " "

For example, to have a table as shown below, include the code shown to the right:
 * }

! colspan="2" style="text-align:left;" | Parties ! Votes ! % ! ± ! Seats ! ± ! colspan="2" style="text-align:left;" | Total ! 13307 ! style="text-align:center;" colspan="2"| 100% ! style="text-align:center;" colspan="2"| 50
 * style="background-color:#ff0000;" |
 * style="text-align:left;" | The red party
 * 6042
 * 45.40
 * −4.41
 * 23
 * −2
 * style="background-color:#00ff00;" |
 * style="text-align:left;" | The green party
 * 5678
 * 42.67
 * +1.23
 * 21
 * 0
 * style="background-color:#0000ff;" |
 * style="text-align:left;" | Free Mars
 * 345
 * 2.59
 * +2.59
 * 1
 * +1
 * style="background-color:#eeeeee;" |
 * style="text-align:left;" | None of the above (unfilled seats)
 * 1242
 * 9.33
 * +0.59
 * 5
 * +1
 * 9.33
 * +0.59
 * 5
 * +1
 * }

Options
Instead of  you can use

To add, use. If you use this, you will need to edit your table to have  as the row separator for the total row. If you want a specific column not to be sortable, specify  in the attributes of its header cell. Sorted tables do not currently work with tables using. See Help:Sorting for more information about sorting.

To align the table on the right side of the page, use.

To suppress the editlink, use.

To collapse the table, use