Help:Tables/collapsible

Collapsible tables and templates allow you to add large elements to a page, without disrupting the flow of the text. For example, a large table which lists every character in a tv show, could be put on every character page. The table would be huge, but in collapsed state would not disrupt the page. Then it is easy for your readers to navigate through the other characters.

You will want to edit your table in source mode to apply these changes.

Check Special:Version on your wiki

 * On MW 1.19, the collapsible table javscript you need is available by default

Add some code to Customize the tables' appearance.

 * You can define this in your Mediawiki:Common.css code.
 * See here for some standard styling

Edit your tables

 * A collapsible table needs to have a header. Make sure you have a line which starts with an exclamation mark at the top of the table. eg.
 * ! I am a header that will display when the table is collapsed.

Mediawiki 1.19 Version

 * add class="mw-collapsible" to the top of your table to make it collapsible

Sample Table
This code:

Creates this table: