Template:Table/doc

{{Table|param1|param2|param3|class=}}

Template:Table/doc

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, or mw-collapsible: Uses the mw-collapsible class to show a [hide] link to collapse the table, but leaves the table uncollapsed by default
  • hide, collapse, collapsed, or mw-collapsed: Uses the mw-collapsible collapsed classes to make the table collapsed with a [show] link to reveal the table.
  • auto or autocollapse: Uses the mw-collapsible autocollapse classes to make the table collapsible, but only collapse it if there are three or more collapsible tables on the page
  • inner or innercollapse: Uses the mw-collapsible innercollapse classes to make the table collapsible, but only collapse if the table is within a larger table with the outercollapse class.
  • outer or outercollapse: Uses the outercollapse class to collapse any smaller tables within the table it that use the innercollapse class. Can be combined with the various collapse and sort options above.
Sort options
  • sort or sortable: Uses the sortable class 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 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.

  1. 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:
  2. 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.
  3. 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.
  4. 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.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.