Template:Table
class="wikitable "
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,collapsible, ormw-collapsible: Uses themw-collapsibleclass to show a [hide] link to collapse the table, but leaves the table uncollapsed by defaulthide,collapse,collapsed, ormw-collapsed: Uses themw-collapsible collapsedclasses to make the table collapsed with a [show] link to reveal the table.autoorautocollapse: Uses themw-collapsible autocollapseclasses to make the table collapsible, but only collapse it if there are three or more collapsible tables on the pageinnerorinnercollapse: Uses themw-collapsible innercollapseclasses to make the table collapsible, but only collapse if the table is within a larger table with theoutercollapseclass.outeroroutercollapse: Uses theoutercollapseclass to collapse any smaller tables within the table it that use theinnercollapseclass. Can be combined with the various collapse and sort options above.
- Sort options
sortorsortable: Uses thesortableclass to add sorting buttons to each column of the table. Can be combined with the various collapse options above or withoutercollapse.
- 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 mw-collapsible mw-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 |
See also
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.