Template:Static row numbers/doc

This template adds a column of row numbers to a table. The numbers do not sort with the rest of the table, remaining static. Optional classes are provided to display a column label or disable numbers on specific rows.

It works on desktop and mobile versions of Wikipedia pages.

Usage
Include this template by adding or its redirect  above a table. Add the  class to the table start wikitext. Optionally add the other classes listed below.

Wikitext:

Used with sortable
Multiple header rows in a sortable table should have the  class added to all header rows except the first one so that they are not numbered when JavaScript is disabled. It is also needed on rows that use the  or   class, described at.

Wikitext:

Produces:

Used without sortable
Multiple header rows in a non-sortable table should have the  class added to all header rows except the first one, described at.

Wikitext:

Produces:

Display "No." text in column label

 * Note. This does not improve accessibility. A blind person said it does nothing for screen reader users.

To display the "No." text in the number column's header (label), add the  class to the table start wikitext.

Wikitext:

Produces:

Display hash ("#") symbol in column label

 * Note. This does not improve accessibility. A blind person said it does nothing for screen reader users.

To display a hash ("#") symbol in the number column's header (label), add the  class to the table start wikitext.

Wikitext:

Produces:

Disable number on specific rows
This section details how to disable numbers on specific rows by adding either the  or   class to the row wikitext.

The  class can be added to data rows to disable the number.

The  class disables the number and border between other rows that use this class consecutively, simulating a   (see Help:Table). It should be added to:
 * Header rows excluding the first. For sortable tables, it prevents numbering when JavaScript is disabled.
 * Rows using the  or   class.

Note, the  or   class is added to a row so it stays at the top or bottom of a sorted list, per Help:Sortable tables.

Wikitext:

Produces:

Redirects

 * Srn
 * Fixed row numbers