This is a documentation subpage for Template:Sticky table start. It may contain usage information, categories and other content that is not part of the original template page. |
This template is used on many pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template uses TemplateStyles: |
This template adds a scrollable container around a table and its classes can be used to make the table's rows stick to the top or the columns stick to the left side of the container as the table's data is scrolled in and out of view.
It's used on tall and/or wide tables that have headers that might be difficult to remember as you scroll through the data. It keeps very wide tables within the main content area's width so the layout of Wikipedia's desktop version remains intact.
A toggle button displays on smaller screens to disable or enable these features for cases where large sticky elements are a hindrance to reading the underlying scrollable data, which is more likely on small devices such as mobile phones.
Using this template without any classes puts a table in a scrollable box without sticky headers. If there is a need for a horizontal-only scroll window (for example with a wide table where sticky headers would be too large, and some rows are very tall) see: Help:Table#Overflowing tables.
Usage
editInclude {{sticky table start}}
above and {{sticky table end}}
below the table. Add any of the following as needed.
Table classes
editClass | Summary |
---|---|
sticky-table-head
|
Make the table head top sticky. Don't combine with sticky-table-rowN . Requires sortable table, which moves consecutive top header rows into the <thead> (table head) HTML element. Rows using the sorttop class become sticky after sorting (issue: T355492). Avoid making headers sticky that aren't for the entire table (ex. section header rows). Avoid making excessively tall header rows sticky that might block too much data on short screens (ex. mobile landscape).
|
sticky-table-rowN
|
Make row N top sticky where N is a number from 1 to 2. Limit 1 to avoid stacking issues where a taller row 1 is still visible. Don't combine with sticky-table-head . Unpredictable results if the row spans or is spanned with the rowspan attribute.
|
sticky-table-colN
|
Make column N left sticky where N is a number from 1 to 2. Limit 1 to avoid stacking issues where a wider column 1 is still visible. Unpredictable results if the column spans or is spanned with the colspan attribute. Avoid making an excessively wide column sticky that might block too much data on narrow screens (ex. mobile portrait).
|
Cell classes
editClass | Summary |
---|---|
sticky-table-none
|
Remove sticky from cell in cases where rowspan causes an issue. For example, a sticky column using rowspan will have some cells that are sticky in the next column. See usage example. Usage search.
|
sticky-table-left
|
Add left sticky to cell in cases where rowspan causes an issue. For example, column 1 using rowspan with a sticky column 2 will have some cells in column 2 that are not sticky and some in column 3 that are sticky. See usage example. Usage search.
|
Sticky row 1 and column 1
editNote: Also works if the table uses the sortable
class.
{{Sticky table start}}
{| class="wikitable sticky-table-row1 sticky-table-col1"
⫶
|}
{{Sticky table end}}
Header 1 | Header 2 | Header 3 | Header 4 | Header 5 | Header 6 | Header 7 | Header 8 | Header 9 | Header 10 | Header 11 | Header 12 | Header 13 | Header 14 | Header 15 | Header 16 | Header 17 | Header 18 | Header 19 | Header 20 | Header 21 | Header 22 | Header 23 | Header 24 | Header 25 | Header 26 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
Sticky head and column 1
editNote: The sticky-table-head
class requires the table to use the sortable
class so the column header rows are moved to the <thead>
element.
The "Header 2" cell uses the sticky-table-none
class to fix the left sticky issue caused by the "Header 1" cell's rowspan
.
{{Sticky table start}}
{| class="wikitable sortable sticky-table-head sticky-table-col1"
|+ Caption
|-
! rowspan="2" | Header 1
! colspan="4" | Header group 1
⫶
|-
! class="sticky-table-none" | Header 2
! Header 3 !! Header 4 !! Header 5 !! …
⫶
|}
{{Sticky table end}}
Header 1 | Header group 1 | Header group 2 | Header group 3 | Header group 4 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Header 2 | Header 3 | Header 4 | Header 5 | Header 6 | Header 7 | Header 8 | Header 9 | Header 10 | Header 11 | Header 12 | Header 13 | Header 14 | Header 15 | Header 16 | Header 17 | Header 18 | Header 19 | Header 20 | |
top | top | top | top | top | top | top | top | top | top | top | top | top | top | top | top | top | top | top | top |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
bottom | bottom | bottom | bottom | bottom | bottom | bottom | bottom | bottom | bottom | bottom | bottom | bottom | bottom | bottom | bottom | bottom | bottom | bottom | bottom |
Usage of sticky-table-none. Sticky column 1
editNote that the table in this section is basically the same as the table in the next section except that a different column is left sticky. This means that a different header uses the sticky-table-none
class.
The header rows are top sticky and the first column is left sticky. When rowspan
messes up what is sticky, the sticky-table-none
class can be used to fix it.
For illustration purposes, a background color has been added to the table:
- yellow for
sticky-table-none
{{Sticky table start}}
{| class="wikitable sortable sticky-table-head sticky-table-col1"
|-
! rowspan="2 | Header 1
! rowspan="2" | Header 2
! colspan="3" | Header group 1 !! …
|-
! class="sticky-table-none" | Header 3
! Header 4
! Header 5 !! …
|-
| data
| rowspan="2" | data
| data || …
|-
| data
| class="sticky-table-none" | data
| data || …
|-
| rowspan="2" | data
| data || …
|-
| class="sticky-table-none" | data
| data
| data || …
⫶
|}
{{Sticky table end}}
Header 1 | Header 2 | Header group 1 | Header group 2 | Header group 3 | Header group 4 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Header 3 | Header 4 | Header 5 | Header 6 | Header 7 | Header 8 | Header 9 | Header 10 | Header 11 | Header 12 | Header 13 | Header 14 | Header 15 | Header 16 | Header 17 | Header 18 | Header 19 | Header 20 | ||
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
Usage of sticky-table-none and sticky-table-left. Sticky column 2
editThe header rows are top sticky and the second column is left sticky. When making a column left sticky and rowspan
messes up what is sticky, the sticky-table-none
and sticky-table-left
classes can be used to fix it.
For illustration purposes, background colors have been added to the table:
- yellow for
sticky-table-none
- orange for
sticky-table-left
{{Sticky table start}}
{| class="wikitable sortable sticky-table-head sticky-table-col2"
|-
! rowspan="2 | Header 1
! rowspan="2" | Header 2
! colspan="3" | Header group 1 !! …
|-
! Header 3
! class="sticky-table-none" | Header 4
! Header 5 !! …
|-
| data
| rowspan="2" | data
| data || …
|-
| data
| class="sticky-table-none" | data
| data || …
|-
| rowspan="2" | data
| data || …
|-
| class="sticky-table-left" | data
| class="sticky-table-none" | data
| data || …
⫶
|}
{{Sticky table end}}
Header 1 | Header 2 | Header group 1 | Header group 2 | Header group 3 | Header group 4 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Header 3 | Header 4 | Header 5 | Header 6 | Header 7 | Header 8 | Header 9 | Header 10 | Header 11 | Header 12 | Header 13 | Header 14 | Header 15 | Header 16 | Header 17 | Header 18 | Header 19 | Header 20 | ||
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
Example with sticky head and column 1
editAdapted from List of U.S. state and territory abbreviations § Table. Narrow your browser window to see left sticky column below.
The column 1 "Name" and column 2 "Status of region" cells in row 1 use rowspan
to span into row 2. When making column 1 left sticky, this makes the first cell in row 2, the empty sorting cell under "ISO", left sticky, so the sticky-table-none
class is added to that cell.
{{sticky table start}}{{mw-datatable}}
{|class="wikitable sortable sticky-table-head sticky-table-col1 mw-datatable"
|+ Codes and abbreviations for U.S. states, federal district, territories, and other regions
! rowspan=2 | [[List of states and territories of the United States|Name]]
! rowspan=2 | Status of region
! [[ISO 3166|ISO]]
! colspan=2 | [[#ANSI standard INCITS 38:2009|ANSI]]
! [[#Postal codes|USPS]]
! [[#Coast Guard vessel prefixes|USCG]]
! rowspan=2 | [[#GPO|GPO]]
! rowspan=2 | [[#Current use of traditional abbreviations|AP]]
! rowspan=2 | Other<br>abbreviations
|-
! class=sticky-table-none | !! !! !! !!
⫶
|}
{{sticky table end}}
Name | Status of region | ISO | ANSI | USPS | USCG | GPO | AP | Other abbreviations | |
---|---|---|---|---|---|---|---|---|---|
United States of America | Federal state | US USA 840 |
US | 00 | U.S. | U.S. | U.S.A. | ||
Alabama | State | US-AL | AL | 01 | AL | AL | Ala. | Ala. | |
Alaska | State | US-AK | AK | 02 | AK | AK | Alaska | Alaska | Ak. |
Arizona | State | US-AZ | AZ | 04 | AZ | AZ | Ariz. | Ariz. | |
Arkansas | State | US-AR | AR | 05 | AR | AR | Ark. | Ark. | |
California | State | US-CA | CA | 06 | CA | CF | Calif. | Calif. | Cal. |
Colorado | State | US-CO | CO | 08 | CO | CL | Colo. | Colo. | |
Connecticut | State | US-CT | CT | 09 | CT | CT | Conn. | Conn. | |
Delaware | State | US-DE | DE | 10 | DE | DL | Del. | Del. | |
District of Columbia | Federal district | US-DC | DC | 11 | DC | DC | D.C. | D.C. | Dis. Col. |
Florida | State | US-FL | FL | 12 | FL | FL | Fla. | Fla. | |
Georgia | State | US-GA | GA | 13 | GA | GA | Ga. | Ga. | Geo. |
Hawaii | State | US-HI | HI | 15 | HI | HA | Hawaii | Hawaii | Hi.; Haw. |
Idaho | State | US-ID | ID | 16 | ID | ID | Idaho | Idaho | Ida. |
Illinois | State | US-IL | IL | 17 | IL | IL | Ill. | Ill. | |
Indiana | State | US-IN | IN | 18 | IN | IN | Ind. | Ind. | |
Iowa | State | US-IA | IA | 19 | IA | IA | Iowa | Iowa | Ioa. |
Kansas | State | US-KS | KS | 20 | KS | KA | Kans. | Kan. | Ka. |
Kentucky | State (officially Commonwealth) | US-KY | KY | 21 | KY | KY | Ky. | Ky. | Ken., Kent. |
Louisiana | State | US-LA | LA | 22 | LA | LA | La. | La. | |
Maine | State | US-ME | ME | 23 | ME | ME | Maine | Maine | |
Maryland | State | US-MD | MD | 24 | MD | MD | Md. | Md. | Mar., Mary. |
Massachusetts | State (officially Commonwealth) | US-MA | MA | 25 | MA | MS | Mass. | Mass. | |
Michigan | State | US-MI | MI | 26 | MI | MC | Mich. | Mich. | |
Minnesota | State | US-MN | MN | 27 | MN | MN | Minn. | Minn. | |
Mississippi | State | US-MS | MS | 28 | MS | MI | Miss. | Miss. | |
Missouri | State | US-MO | MO | 29 | MO | MO | Mo. | Mo. | |
Montana | State | US-MT | MT | 30 | MT | MT | Mont. | Mont. | |
Nebraska | State | US-NE | NE | 31 | NE | NB | Nebr. | Neb. | |
Nevada | State | US-NV | NV | 32 | NV | NV | Nev. | Nev. | |
New Hampshire | State | US-NH | NH | 33 | NH | NH | N.H. | N.H. | |
New Jersey | State | US-NJ | NJ | 34 | NJ | NJ | N.J. | N.J. | N. Jersey |
New Mexico | State | US-NM | NM | 35 | NM | NM | N. Mex. | N.M. | New M., New Mex. |
New York | State | US-NY | NY | 36 | NY | NY | N.Y. | N.Y. | N. York |
North Carolina | State | US-NC | NC | 37 | NC | NC | N.C. | N.C. | N. Car. |
North Dakota | State | US-ND | ND | 38 | ND | ND | N. Dak. | N.D. | |
Ohio | State | US-OH | OH | 39 | OH | OH | Ohio | Ohio | O., Oh. |
Oklahoma | State | US-OK | OK | 40 | OK | OK | Okla. | Okla. | |
Oregon | State | US-OR | OR | 41 | OR | OR | Oreg. | Ore. | |
Pennsylvania | State (officially Commonwealth) | US-PA | PA | 42 | PA | PA | Pa. | Pa. | Penn., Penna. |
Rhode Island | State | US-RI | RI | 44 | RI | RI | R.I. | R.I. | R.I. & P.P. |
South Carolina | State | US-SC | SC | 45 | SC | SC | S.C. | S.C. | S. Car. |
South Dakota | State | US-SD | SD | 46 | SD | SD | S. Dak. | S.D. | SoDak |
Tennessee | State | US-TN | TN | 47 | TN | TN | Tenn. | Tenn. | |
Texas | State | US-TX | TX | 48 | TX | TX | Tex. | Texas | |
Utah | State | US-UT | UT | 49 | UT | UT | Utah | Utah | Ut. |
Vermont | State | US-VT | VT | 50 | VT | VT | Vt. | Vt. | Verm. |
Virginia | State (officially Commonwealth) | US-VA | VA | 51 | VA | VA | Va. | Va. | Virg. |
Washington | State | US-WA | WA | 53 | WA | WN | Wash. | Wash. | Wn. |
West Virginia | State | US-WV | WV | 54 | WV | WV | W. Va. | W.Va. | W.V., W. Virg. |
Wisconsin | State | US-WI | WI | 55 | WI | WS | Wis. | Wis. | Wisc. |
Wyoming | State | US-WY | WY | 56 | WY | WY | Wyo. | Wyo. | |
American Samoa | Insular area (Territory) | AS ASM 016 US-AS |
AS | 60 | AS | AS | A.S. | ||
Guam | Insular area (Territory) | GU GUM 316 US-GU |
GU | 66 | GU | GU | Guam | ||
Northern Mariana Islands | Insular area (Commonwealth) | MP MNP 580 US-MP |
MP | 69 | MP | CM | M.P. | CNMI | |
Puerto Rico | Insular area (Commonwealth) | PR PRI 630 US-PR |
PR | 72 | PR | PR | P.R. | ||
U.S. Virgin Islands | Insular area (Territory) | VI VIR 850 US-VI |
VI | 78 | VI | VI | V.I. | U.S.V.I. | |
U.S. Minor Outlying Islands | Insular areas | UM UMI 581 US-UM |
UM | 74 | UM | ||||
Baker Island | Island | UM-81 | 81 | XB | |||||
Howland Island | Island | UM-84 | 84 | XH | |||||
Jarvis Island | Island | UM-86 | 86 | XQ | |||||
Johnston Atoll | Atoll | UM-67 | 67 | XU | |||||
Kingman Reef | Atoll | UM-89 | 89 | XM | |||||
Midway Atoll | Atoll | UM-71 | 71 | QM | |||||
Navassa Island | Island | UM-76 | 76 | XV | |||||
Palmyra Atoll | Atoll | UM-95 | 95 | XL | |||||
Wake Island | Atoll | UM-79 | 79 | QW | |||||
Marshall Islands | Freely associated state | MH MHL 584 |
MH | 68 | MH | ||||
Micronesia | Freely associated state | FM FSM 583 |
FM | 64 | FM | ||||
Palau | Freely associated state | PW PLW 585 |
PW | 70 | PW | ||||
U.S. Armed Forces – Americas | US military mail code | AA | |||||||
U.S. Armed Forces – Europe | US military mail code | AE | |||||||
U.S. Armed Forces – Pacific | US military mail code | AP | |||||||
Nebraska | Obsolete postal code | NB | |||||||
Northern Mariana Islands | Obsolete postal code | CM | |||||||
Panama Canal Zone | Obsolete postal code | PZ PCZ 594 |
CZ | ||||||
Philippine Islands | Obsolete postal code | PH PHL 608 |
PI | ||||||
Trust Territory of the Pacific Islands | Obsolete postal code | PC PCI 582 |
TT |
Example with sticky row 2 and column 2
editAdapted from WTA 1000 Series singles records and statistics § Title leaders. Narrow your browser window to see left sticky column below.
Note: The column 1 "Titles", "Player", and "Years" cells have their rowspan
removed and the cells moved from row 1 to row 2 to facilitate making row 2 top sticky. Because row 1 is hidden when row 2 is sticky, the other cells in row 2 have a background color to visually relate them to the "Active tournaments" and "Defunct tournaments" parent cells in row 1. The two cells in row 1 are kept for screen readers instead of moving them to a legend. Doing this helps reduce the amount of top sticky content: 1 row instead of 2.
The "10", "9", "6", and "5" cells in the "Titles" column 1 use rowspan
. When making column 2 left sticky, cells in the spanned rows have column 2 not left sticky and column 3 left sticky, so the sticky-table-left
and sticky-table-none
classes are added to those column 2 and column 3 cells, respectively.
{{mw-datatable}}{{sort under}}{{sticky table start}}
{| class="wikitable mw-datatable sortable sort-under-center sticky-table-row2 sticky-table-col2" style="text-align:center"
⫶
|-
! scope="row" rowspan="3" |10
|style="text-align:left" | {{sort|Henin.|{{flagg|uxx|BEL}} [[Justine Henin]]}}
| -
| -
⫶
|-
|style="text-align:left; background-color:#FFFFE0;" class="sticky-table-left" | {{sort|Azarenka.|{{flagg|uxx|BLR}} '''[[Victoria Azarenka]]'''}}*
| class="sticky-table-none" | -
| style="background-color:#B9FF72;" |2*
⫶
|-
|style="text-align:left; background-color:#FFFFE0;" class="sticky-table-left" | {{sort|Świątek.|{{flagg|uxx|POL}} '''[[Iga Świątek]]'''}}*
| class="sticky-table-none" | -
| style="background-color:#B9FF72;" |2*
⫶
|}
{{sticky table end}}
Active tournaments | Defunct tournaments | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Titles | Player | DU | QA | IW | MI | MA | IT | CA | CI | WU | CN | FL | CH | GE | SD | PH | KC | PP | ZU | Years |
23 | Serena Williams | - | - | 2* | 8* | 2 | 4* | 3 | 2* | - | 1 | - | 1 | - | - | - | - | - | - | 1999–2016 |
17 | Martina Hingis | - | - | 1 | 2 | - | 2 | 2 | - | - | - | - | 2* | 1 | - | - | 1 | 5* | 1 | 1997–2007 |
15 | Steffi Graf | - | - | 1 | 3 | - | - | 2 | - | - | - | 1* | 1 | 5* | - | 1* | - | 1 | - | 1990–1996 |
14 | Maria Sharapova | - | 1 | 2* | - | 1 | 3 | - | 1 | - | 1 | - | - | - | 2* | - | - | 2 | 1 | 2005–2015 |
11 | Lindsay Davenport | - | - | 2* | - | - | - | - | - | - | - | - | - | - | 1 | - | - | 4 | 4* | 1997–2005 |
10 | Justine Henin | - | - | 1 | - | - | - | 2 | - | - | - | - | 2* | 3 | - | - | - | - | 2 | 2002–2007 |
Victoria Azarenka* | - | 2* | 2* | 3 | - | - | - | 2* | - | 1 | - | - | - | - | - | - | - | - | 2009–2020 | |
Iga Świątek* | - | 2* | 2* | 1 | 1 | 3 | - | - | - | 1 | - | - | - | - | - | - | - | - | 2021–2024 | |
9 | Conchita Martínez | - | - | - | - | - | 4* | - | - | - | - | - | 2* | 2 | - | 1* | - | - | - | 1993–2000 |
Monica Seles | - | - | - | 2 | - | 2 | 4* | - | - | - | - | - | 1 | - | - | - | - | - | 1990–2000 | |
Venus Williams* | 2* | - | - | 3 | - | 1 | - | - | 1 | - | - | 1 | - | - | - | - | - | 1 | 1998–2015 | |
Simona Halep* | 1 | 1 | 1 | - | 2 | 1 | 3 | - | - | - | - | - | - | - | - | - | - | - | 2014–2022 | |
Petra Kvitová* | - | 1 | - | 1 | 3* | - | 1 | - | 2* | - | - | - | - | - | - | - | 1 | - | 2011–2023 | |
7 | Kim Clijsters | - | - | 2* | 2 | - | 1 | 1 | 1 | - | - | - | - | - | - | - | - | - | - | 2003–2010 |
6 | Arantxa Sánchez Vicario | - | - | - | 2 | - | 1 | 2 | - | - | - | - | 1 | - | - | - | - | - | - | 1992–1996 |
Amélie Mauresmo | - | - | - | - | - | 2 | 2 | - | - | - | - | - | 2 | - | - | - | - | - | 2001–2005 | |
Jelena Janković | - | - | 1 | - | - | 2 | - | 1 | - | - | - | 1 | - | - | - | 1 | - | - | 2007–2010 | |
Caroline Wozniacki* | 1 | - | 1 | - | - | - | 1 | - | - | 2* | - | - | - | - | - | - | 1 | - | 2010–2018 | |
Aryna Sabalenka* | - | 1 | - | - | 2 | - | - | 1 | 2* | - | - | - | - | - | - | - | - | - | 2018–2024 | |
5 | Gabriela Sabatini | - | - | - | - | - | 2 | - | - | - | - | 1* | 2* | - | - | - | - | - | - | 1991–1992 |
Mary Pierce | - | - | - | - | - | 1 | - | - | - | - | - | 1 | - | 1 | - | 2* | - | - | 1997–2005 | |
Dinara Safina | - | - | - | - | 1 | 1 | 1 | - | - | - | - | - | 1 | - | - | - | 1 | - | 2008–2009 | |
Agnieszka Radwańska | - | - | - | 1 | - | - | 1 | - | - | 2* | - | - | - | - | - | - | 1 | - | 2011–2016 |
Note: The asterisks (*) are used because screen readers can not see cell background colors.
Note: In article namespace in dark mode the links in colored cells are underlined black links. See:
- Help:Table#Color contrast of links in dark mode and the previous sections.
See also
edit- Help:Table/Advanced § Scrolling tables with sticky column and row headers
- {{sticky header}} - Makes column headers stick to the top of the page while scrolling through table data.
- {{shy}} – Can be used to help narrow columns by adding a soft hyphen to a word to allow it to wrap.
- Help:Table#Colors in tables
More template styles for tables:
- {{sort under}} - moves the sorting arrows under the headers.
- {{row hover highlight}} - adds row hover highlighting, and option for white background.
- {{static row numbers}} - adds a column of row numbers to a table.
- {{table alignment}} - aligns the cells in a column, or a whole table.