Template:Static row numbers/doc


 * Note: Category:Articles with tables with fixed row numbers uses a deprecated template. Please replace it with Static row numbers.

Template to automatically add row numbers to sortable tables. The row numbers will not be sorted when columns of data are sorted. A possible note to add above a table:

These templates work together and make table formatting fast: Some are used together here: List of U.S. states and territories by incarceration and correctional supervision rate
 * Static row numbers table
 * Static row numbers header
 * Static row numbers arrows
 * Static row numbers total

Usage with and
Place template before table where the automatic row numbers are required. Add class  to the table wikitext, as in the following example. It adds an unsorted column of row numbers.

Usage with no other classes
While designed to provide a static row number for sortable tables, it can be used just to add an automatic row number to plain tables.

Using to add a hash # column header
This adds a hash # as the row number column header.

Marking additional header and footer rows with
The class  is added to additional header rows (other than the first one). It prevents those header rows from having row numbers. It also prevents them from being sorted. It is important to add this class for consistent appearance in different Wikipedia skins and views. It is necessary for correct numbering in the minerva skin on mobile view which renders HTML tables differently.

Marking footer or header rows that also contain data cells (non-header cells)
To prevent them from sorting  or   must also be added. For an example of header rows like this see this version of the 2021 table in this list article.

White background for data cells
Add  to the top line of the table  wikitext. It can be used on tables with inline cell or row background colors. Neither are affected by this class.

This class is unnecessary if you are using this: The class is incorporated into that template.
 * Static row numbers table