Search results
Results From The WOW.Com Content Network
All tables below have data-sort-type=isoDate added to the column headers. Remember to leave a space in the wikitext before years that are a negative number. Otherwise, |-will be used as table formatting instead of |. "c." stands for circa (approximately). "c." before the date breaks sorting in the first table.
Collapsible tables can be sortable, too, by also including the sortable class (see § Sortable tables). By default, a collapsible table begins expanded. By default, a collapsible table begins expanded.
sortable – adds up & down icons to column headers which enable sorting the table on a given column. See sortable tables. mw-collapsible – See collapsible tables. [note 1] plainrowheaders – applies left-aligned and normal-weight formatting of row headers. See Table header layout.
The two most commonly used classes are "wikitable" and "wikitable sortable"; the latter allows the reader to sort the table by clicking on the header cell of any column. |+ caption Required for accessibility purposes on data tables, and placed only between the table start and the first table row. ! header cell Optional.
If a table is created in Visual Editor, the dialog includes a checkbox to "Make table sortable". If you check this box, then a reader can sort the table by any column, by clicking on the header cell for that column. Existing tables, or tables created in wikitext can be made sortable by adding the wikitable sortable class to the top of the table:
Adding data-sort-type="number" to the relevant column header solves many numerical sorting problems. See Help:Sortable tables § Forcing a column to have a particular data type . This template can be useful when building a sortable table in which a column contains both numbers and text.
The article List of social networking websites consists primarily of a sortable table, which lets readers reorganize the table to better find what they want. (For more on sorting tables, see the section about sortable tables.) A fourth kind of formatting for lists uses a graphical timeline.
This template can be useful when making a sortable table involving awards received or competition placement, through the automatic generation of a hidden sortkey. This is helpful because the default alphabetical sorting does not make sense: