FANDOM


Wiki Tables can use different classes to modify them to fit your needs. For classes that should be applied to the whole table, the class attribute is added directly after the table's opening tag [{|]. Below are all the table classes used on this wiki.

(No Class)

Wiki Tables without a class still position items in their cells in rows and columns. This is useful for positioning images and other elements. Example:

{|
|Top Left
|Top Right
|-
|Bottom Left
|Bottom Right
|}

Result:

Top Left Top Right
Bottom Left Bottom Right

wikitable

However, to add the cell borders and other styling, the "wikitable" class must be added like this:

{| class="wikitable"
|Top Left
|Top Right
|-
|Bottom Left
|Bottom Right
|}

Result:

Top Left Top Right
Bottom Left Bottom Right

mw-collapsible

You can also make wikitables collapsible with the mw-collapsible class. Adding the mw-collapsed class as well will make the table collapsed by default. Example:

{| class="mw-collapsible mw-collapsed wikitable"
! colspan="2" |Header
|-
|Top Left
|Top Right
|-
|Bottom Left
|Bottom Right
|}

Result:

Header
Top Left Top Right
Bottom Left Bottom Right

sortable

Adding the "sortable" class will make the table's columns sortable alphabetically or numerically. The positions of other cells will be changed to match the new locations of the sorted cells. Example:

{| class="sortable wikitable"
! Header
! Header 2
|-
|A
|3
|-
|C
|2
|-
|B
|1
|}

Result:

Header Header 2
A 3
C 2
B 1

alternating-table

This table class along with some row classes are used to apply a pattern to the cells to make the table more readable.

{| class="alternating-table"
! Header !! Header 2 !! Header 3
|- class="t-light"
| One || Two || Three
|- class="t-dark"
| Four || Five || Six
|- class="t-light"
| Seven || Eight || Nine
|- class="t-dark"
| Ten || Eleven || Twelve
|}

Result:

Header Header 2 Header 3
One Two Three
Four Five Six
Seven Eight Nine
Ten Eleven Twelve

th-blue

This class is identical to the wikitable class except that the header cells have a different, blue design. This header cell design matches that of other table classes used around the wiki. Example:

{| class="th-blue-table"
! !! Header 1 !! Header 2 !! Header 3
|-
! Row 1
| One || Two || Three
|-
! Row 2
| Four || Five || Six
|-
! Row 3
| Seven || Eight || Nine
|-
! Row 4
| Ten || Eleven || Twelve
|}

Result:

Header 1 Header 2 Header 3
Row 1 One Two Three
Row 2 Four Five Six
Row 3 Seven Eight Nine
Row 4 Ten Eleven Twelve




Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.