Template:Table/doc
		
		
		
		
		
		Jump to navigation
		Jump to search
		
		
	
|  | This is a  documentation  subpage for Template:Table. It contains usage information,  categories and other content or metadata that is not part of the original template. | 
Usage
{{Table|param1|param2|param3|class=}}
Use at the beginning of a table to assign the wikitable and other commonly used table CSS classes. With no parameters, the template outputs class="wikitable". The param1, param2, and param3 parameters can be any of the following options:
- Collapse options
- show,- hidable, or- collapsible: Uses the- collapsibleclass to show a [hide] link to collapse the table, but leaves the table uncollapsed by default
- hide,- collapse, or- collapsed: Uses the- collapsible collapsedclasses to make the table collapsed with a [show] link to reveal the table.
- autoor- autocollapse: Uses the- collapsible autocollapseclasses to make the table collapsible, but only collapse it if there are three or more collapsible tables on the page
- inneror- innercollapse: Uses the- collapsible innercollapseclasses to make the table collapsible, but only collapse if the table is within a larger table with the- outercollapseclass.
- outeror- outercollapse: Uses the- outercollapseclass to collapse any smaller tables within the table it that use the- innercollapseclass. Can be combined with the various collapse and sort options above.
- Sort options
- sortor- sortable: Uses the- sortableclass to add sorting buttons to each column of the table. Can be combined with the various collapse options above or with- outercollapse.
- Other options
- Any other Wikipedia class may be specified using the |class = parameter.
Up to three parameters can be used, plus the custom |class = parameter, and they can be specified in any order.
Examples
- With no parameters
{| {{Table}}
! Rows !! Data
|-
! Row 1
| Datum1
|-
! Row 2
| Datum2
|}
Uses class="wikitable" to produce
| Rows | Data | 
|---|---|
| Row 1 | Datum1 | 
| Row 2 | Datum2 | 
- With parameters
{| {{Table|hide|sort}}
! Rows !! Data
|-
! Row 1
| Datum1
|-
! Row 2
| Datum2
|}
Uses class="wikitable collapsible collapsed sortable" to produce
| Rows | Data | 
|---|---|
| Row 1 | Datum1 | 
| Row 2 | Datum2 | 
- With custom parameters
{| {{Table|sort|class=floatright}}
! Rows !! Data
|-
! Row 1
| Datum1
|-
! Row 2
| Datum2
|}
Uses class="wikitable sortable   floatright" to produce:
| Rows | Data | 
|---|---|
| Row 1 | Datum1 | 
| Row 2 | Datum2 |