Template:Short description Template:Table help Template:Wikipedia how to Template:Wiki markup <templatestyles src="Help:Table/styles.css" />

A table is an arrangement of columns and rows that organizes and positions data or images. Tables can be created on Wikipedia pages using special wikitext syntax, or HTML syntax, and many different styles and tricks can be used to customise them.

ToolsEdit

Source mode toolbarEdit

File:Toolbar2.PNG
Monobook toolbar. Table icon File:Button insert table.png is on the right end.

To automatically insert a table, click File:Vector toolbar insert table button new.png or File:Button insert table.png (Insert a table) on the edit toolbar. In the Vector toolbar the table icon is in the "Advanced" menu.

The following wikitext is inserted when Insert a table File:Vector toolbar insert table button new.png is clicked.

<syntaxhighlight lang=wikitext class=gridbox>

Caption text
Header text Header text Header text
Example Example Example
Example Example Example
Example Example Example

</syntaxhighlight>

The sample text ("Header text" or "Example") is intended to be replaced with actual data. Row numbers (1-3) and column letters (A-C) have been substituted below to help visualization.

Wikitext <syntaxhighlight lang=wikitext>

Caption text
Header A Header B Header C
row 1 A row 1 B row 1 C
row 2 A row 2 B row 2 C
row 3 A row 3 B row 3 C

</syntaxhighlight>

Produces:

Caption text
Header A Header B Header C
row 1 A row 1 B row 1 C
row 2 A row 2 B row 2 C
row 3 A row 3 B row 3 C

You can fill in the table while in source mode. Or use the visual editor (VE). To create more complex table structures in source mode with cells that span multiple rows or columns, see Template:Slink.

Visual editorEdit

{{#invoke:Hatnote|hatnote}} With the visual editor (VE) you directly fill in the cells without having to go through wikitext. VE makes it easy to add or delete rows or columns. In VE this is what shows up when clicking the table icon (in the "Insert" menu):

For more complex table structures, Visual editor offers cell-merging operations; see details here.

In addition, it is usually possible to add or import a table that exists elsewhere (e.g., in a spreadsheet, on another website) directly into the visual editor by:

  • dragging and dropping a .csv file into the visual editor, or
  • selecting, copying, and pasting the table into the visual editor.

Using other toolsEdit

Template:See also Other tools, such as those used to create wiki tables from Excel, can be used to create wikitable markup from spreadsheet and database tables. See § External links for a list of some.

Table basicsEdit

Tables can be added to articles and other pages using either standard HTML table elements, or with special wikicode markup developed just to facilitate creating tables without a knowledge of HTML.

MarkupEdit

Template:See also Template:Mw-datatable

Overview of basic table markup
Table element Wikitext Required Usage notes
Table start Template:Kbd Required Note: Template:Kbd Entire table goes here Template:Kbd
Caption Template:Kbd Optional Only between table start and first table row.
Row Template:Kbd Optional Can be omitted before the first row.
Header cell Template:Kbd or Template:Kbd Optional Consecutive table header cells may be added on the same line separated by double marks (!!); or start on new lines, each with its own single mark (!).
Data cell Template:Nowrap Optional Consecutive table data cells may be added on the same line separated by double marks (||) or start on new lines, each with its own single mark (|). This mark is also used to separate HTML attributes from cell and caption contents.
Table end Template:Kbd Required
  • The above marks must start on a new line, except the double marks (|| and !!) for optionally adding consecutive cells to a single line.
  • Blank spaces at the beginning of a line are ignored.
  • Content may either follow its cell mark on the same line (after any optional HTML attributes); or on lines below the cell mark (beware of undesired paragraphs though). Content that uses wiki markup that itself needs to start on a new line, such as with lists, headings, or nested tables, must be on its own new line.
  • To insert a pipe character (|) into a table caption or cell, use the <nowiki>|</nowiki> escaping markup.

HTML attributesEdit

Each mark, except table end (|}), optionally accepts one or more attributes. Attributes must be on the same line as the mark.

  • Cells and captions (| or ||, ! or !!, and |+) hold content—separate any attribute from its content with a single pipe (|), with attributes preceding content.
  • Table and row marks ({| and |-) do not directly hold content. Do not add a pipe (|) after any attributes.

Commonly included attributes with table scope include: class, for example class="wikitable"; or style for CSS styling. Other attributes have row- or column scope, e.g., scope, to indicate row or column header cells; rowspan, to extend cells by more than one row; and colspan, to extend cells by more than one column.

Wikicode syntax tutorialEdit

<templatestyles src="Help:Table/styles.css" /> {{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}} Template:For

A table may be created entirely in wikicode using special table markup developed for the purpose. No knowledge of HTML is required.

Begin and end delimitersEdit

Use {| to begin a table, and |} to end it. Each one needs to be on its own line:

<syntaxhighlight lang=wikitext class=gridbox>

table code goes here

</syntaxhighlight>

Optional parameters like Template:Kbd may be placed on the Begin-table delimiter line. See Template:Slink below.

CaptionEdit

An optional table caption is included with a line starting with a vertical bar and plus sign "|+" and the caption after it:

<syntaxhighlight lang=wikitext highlight=2 class=gridbox>

caption table code goes here

</syntaxhighlight>

Row startEdit

To start a new table row, type a vertical bar and a hyphen on its own line: "|-". The codes for the cells in that row start on the next line.

<syntaxhighlight lang=wikitext highlight=3,5 class=gridbox>

row code goes here next row code goes here
The table's caption

</syntaxhighlight>

For details about rows, see Template:Slink below.

CellsEdit

Type the codes for each table cell in the next row, starting with a bar:

<syntaxhighlight lang=wikitext highlight=4,6,7 class=gridbox>

The table's caption
cell code goes here
next row cell code goes here next cell code goes here

</syntaxhighlight>

Cells can be separated with either a new line and a single bar, or by a double bar "||" on the same line. Both produce the same output:

Wikitext <syntaxhighlight lang="wikitext" highlight=4>

The table's caption
Cell 1 Cell 2 Cell 3
Cell A Cell B Cell C
Cell x Cell y Cell z
</syntaxhighlight>

Produces

The table's caption
Cell 1 Cell 2 Cell 3
Cell A Cell B Cell C
Cell x Cell y Cell z

For details about table cells, see Template:Slink below.

Optional parametersEdit

Template:Anchor Optional parameters can modify the display and styling of cells, rows, or the entire table. The simplest way to add styling is to set the wikitable CSS class, which in Wikipedia's external style sheet is defined to apply a gray color scheme and cell borders to tables using it:

Wikitext <syntaxhighlight lang="wikitext" highlight=1>

The table's caption
Column header 1 Column header 2 Column header 3
Row header 1 Cell 2 Cell 3
Row header A Cell B Cell C
</syntaxhighlight>

Produces

The table's caption
Column header 1 Column header 2 Column header 3
Row header 1 Cell 2 Cell 3
Row header A Cell B Cell C

The table parameters and cell parameters are the same as in HTML, see http://www.w3.org/TR/html401/struct/tables.html#edef-TABLE and Table (HTML). However, the Template:Tag, Template:Tag, Template:Tag, Template:Tag, and Template:Tag elements are currently not supported in MediaWiki, Template:As of.

A table can be useful even if none of the cells have content. For example, the background colors of cells can be changed with cell parameters, making the table into a diagram, like meta:Template talk:Square 8x8 pentomino example. An "image" in the form of a table is much more convenient to edit than an uploaded image.

If all the cells in a row are empty the cells still show up. If the header cell is also empty for that row all the cells show up, but they are narrow. That can be fixed with a simple <br> in one of the cells. That is what is done here:

{{sort under}} is simpler for putting the sorting arrows below the header text in order to narrow a table.

With colspan and rowspan cells can span several columns or rows; Template:See below

Displaying a pipe characterEdit

Displaying a pipe character as part of the text of a table cell requires a workaround. See Template:Slink.

ScopeEdit

Column headers are identified by ! scope="col" | instead of |. Row headers are identified by ! scope="row" | instead of |. Each header cell should be on a separate line in the wiki-markup. The scope="col" and scope="row" markup should be used for column and row headers in all data tables because it explicitly associates the header with the corresponding cells, which helps ensure a consistent experience for screen readers. The Manual of Style requires the use of scope for column and row headers.

For complex tables, when a header spans two columns or rows, use ! scope="colgroup" colspan="2" | or ! scope="rowgroup" rowspan="2" | respectively to clearly identify the header as a column header of two columns or a row header of two rows. When headers are unclear, this can cause accessibility issues; therefore, use id= to set a unique value without spaces on each header, then reference the id(s) on the data cells that have unclear headers using headers= with a space separating each id.

Header cells typically render differently from regular cells, depending on the browser. They are often rendered in a bold font and centered. If this rendering is not desired from an aesthetic point of view, the table can be styled with the "Template:Visible anchor" class which left-aligns the row headers and removes the bolding. Left-alignment of row headers only occurs if class=wikitable and scope=row are both used.

A typical example may be marked up like this:

Wikitext <syntaxhighlight lang="wikitext" highlight="7,8,10,11">

The table's caption
Column header 1 Column header 2 Column header 3
Row header 1 Cell 2 Cell 3
Row header A Cell B Cell C
</syntaxhighlight>

Produces

The table's caption
Column header 1 Column header 2 Column header 3
Row header 1 Cell 2 Cell 3
Row header A Cell B Cell C

ExamplesEdit

Minimalist tableEdit

Both of these generate the same output. Choose a style based on the number of cells in each row and the total text inside each cell.

Wikitext <syntaxhighlight lang=wikitext>

A B
C D

</syntaxhighlight>

<syntaxhighlight lang=wikitext highlight=3,5>

A B
C D
</syntaxhighlight>

Produces (note that there are no borders).

A B
C D

Multiplication tableEdit

Note that in this example class="wikitable" is used to style the table with Wikipedia's external style sheet for tables. It adds borders, background shading, and bold header text.

Wikitext

<syntaxhighlight lang=wikitext>

Multiplication table
× 1 2 3
1 1 2 3
2 2 4 6
</syntaxhighlight>

Produces

Multiplication table
× 1 2 3
1 1 2 3
2 2 4 6

Whole table operationsEdit

ClassEdit

One or more classes may be added to the § Begin-table delimiter line at the top of the table, and may be used to supply predefined style to the table. The wikicode table Template:Kbd attribute corresponds directly to the "Template:Kbd" attribute of the HTML <table> element. To add multiple classes to a table, place them all on the same line, embedded in double quotes and separated by a space: <syntaxhighlight lang=wikitext class=grid>

</syntaxhighlight> Some predefined classes are:
A sortable wikitable
breed ht wt
Labrador Retriever 23 70
French Bulldog 12 25
German Shepherd 27 78
Golden Retriever 23 71
English Bulldog 14 45
  • Template:Kbd – provides column headers with bold font on shaded background, and other common style. See here for details. This class should be used for almost all tables, unless there is a reason not to.
  • Template:Kbd – adds up & down icons to column headers which enable sorting the table on a given column. See sortable tables.
  • Template:Kbd – See collapsible tables.Template:Efn
  • Template:Kbd – applies left-aligned and normal-weight formatting of row headers. See Table header layout. Must be placed after wikitable if they both appear in the class declaration.
  • Template:Kbd – same as applying style="float:right; clear:right; margin-left:8px" to the entire table
  • Template:Kbd – same as applying style="float:left; clear:left; margin-right:8px" to the entire table

Note: Template:Table may also be used to apply classes to the § Begin-table delimiter line.

Captions and summariesEdit

Template:More Explicit table captions (or titles) are recommended for data tables as a best practice; the Wikipedia Manual of Style considers them a high priority for accessibility reasons (screen readers), as a caption is explicitly associated with the table, unlike a normal wikitext heading or introductory sentence. All data tables on Wikipedia require captions. A caption is provided with the |+ markup, similar to a table row (|-), but it does not contain any cells, and is not within the table border. Captions are always displayed, appearing as a title centered (in most browsers), above the table. A caption can be styled (with inline, not block, CSS), and may include wikilinks, reference citations, etc.

Many article editors dislike table captions when the table is directly below, or not far away from, a similar article heading. But screen reader users still need a table caption to quickly browse from table to table. In this case use the popular {{sro}} template: Template:Screen reader-only. Add the template to the table caption, and then only screen reader users will see it. Example:

<syntaxhighlight lang="wikitext" inline>|+ Template:Sro</syntaxhighlight>

For current table caption and summary guidelines see the w3.org page: Caption & Summary, in Tables Tutorial. Web Accessibility Initiative (WAI). The summary info in the paragraph below is out of date:

A Template:Em provides an overview of the data of a table for text and audio browsers, and does not normally display in graphical browsers. The summary (also a high Manual of Style priority for tables) is a synopsis of content, and does not repeat the caption text; think of it as analogous to an image's alt description. A summary is added with summary="Template:Var", on the same line as the {| that opened the table, along with any class= and other parameters for the table as a whole. The summary= attribute is, however, obsolete in HTML 5.

Wiki markup example showing left-aligned caption with a source citation: <syntaxhighlight lang="wikitext">

Data reported for 2014–2015, by region<ref name="Garcia 2005"/>
Year Africa Americas Asia & Pacific Europe
2014 2,300 8,950 9,325 4,200
2015 2,725 9,200 8,850 4,775
</syntaxhighlight>

Produces

Data reported for 2014–2015, by regionTemplate:Dummy ref
Year Africa Americas Asia & Pacific Europe
2014 2,300 8,950 9,325 4,200
2015 2,725 9,200 8,850 4,775

Colspan and rowspanEdit

Template:Anchor It is possible to create cells that stretch over two or more columns. For this, one uses |colspan=Template:Var | Template:Var. Similarly, one can create cells that stretch over two or more rows. This requires |rowspan=Template:Var | Template:Var. In the table code, one must Template:Em. The resulting column- and row-counting must fit.

Wikitext <syntaxhighlight lang=wikitext line highlight=8,19>

col1 col2 col3 col4
row1 A C
row2 AA BB CC
row3 AAA BBB CCC
row4 AAAA CCCC
</syntaxhighlight>

Produces

col1 col2 col3 col4
row1 A C
row2 AA BB CC
row3 AAA BBB CCC
row4 AAAA CCCC

In the code, the cell | colspan="2" | A spans two columns. Note that, in the next column, Template:Em.

Similar: in the code, cell | rowspan="2" | BBB spans two rows. Template:Em.

Wikitext <syntaxhighlight lang=wikitext line highlight=14>

Column 1 Column 2 Column 3
A B
C D
E F
G
H
</syntaxhighlight>

Produces

Column 1 Column 2 Column 3
A B
C D
E F
G
H

Note that using rowspan=2 for cell G combined with rowspan=3 for cell F to get another row below G and F won't work, because all (implicit) cells would be empty.

Below is the same table with the order of the declared rows and cells shown in parentheses. The uses of rowspan and colspan are also shown.

Wikitext <syntaxhighlight lang=wikitext>

Column 1
(row 1 cell 1)
Column 2
(row 1 cell 2)
Column 3
(row 1 cell 3)
A
(row 2 cell 1)
rowspan=2
B
(row 2 cell 2)
colspan=2
C
(row 3 cell 1)
D
(row 3 cell 2)
E
(row 4 cell 1)
F
(row 4 cell 2)
rowspan=2 colspan=2
G
(row 5 cell 1)
H
(row 6 cell 1)
colspan=3
</syntaxhighlight>

Produces

Column 1
(row 1 cell 1)
Column 2
(row 1 cell 2)
Column 3
(row 1 cell 3)
A
(row 2 cell 1)
rowspan=2
B
(row 2 cell 2)
colspan=2
C
(row 3 cell 1)
D
(row 3 cell 2)
E
(row 4 cell 1)
F
(row 4 cell 2)
rowspan=2 colspan=2
G
(row 5 cell 1)
H
(row 6 cell 1)
colspan=3

Note that although cell C is in column 2, C is the 1st cell declared in row 3, because column 1 is occupied by cell A, which was declared in row 2. Cell G is the only cell declared in row 5, because cell F occupies the other columns but was declared in row 4.

Table styleEdit

A Template:Kbd element may be added to apply to the entire table, to all the cells § in a row, or just to individual cells in the table. Adding a style to a column requires a template such as Template:Tl (for horizontal alignment of text).

To add style to the entire table, add the Template:Kbd element to the § Begin-table delimiter line at the top of the table. Note that in some cases, it may be better to use the style encapsulated in one of the predefined classes; see Template:Slink.

Horizontal text alignmentEdit

Template:More Text alignment (right/center/left) for the whole table (except the headers in a table using class=wikitable) can be done at the top line of the table wikitext: <syntaxhighlight lang=wikitext highlight=1 class=gridbox>

...

</syntaxhighlight>

Text alignment for a column can be done with Template:Tl.

HeightEdit

The height of the whole table can be specified using standard CSS style properties on the § start table indicator line:

<syntaxhighlight lang=wikitext highlight=1,6 class=gridbox>

. . .

</syntaxhighlight>

Note that you may also specify the § height of individual rows, and if they add up to more than the table height you specified or if word wrapping increases row height, the table height you specified will be ignored and the table height increased as needed to accommodate all the rows (except on mobile where the bottom of the table will be cut off).

BordersEdit

Note: Wikipedia:HTML 5#Table attributes. CSS to replace obsolete attributes for borders, padding, spacing, etc.

Add a border around a table using the CSS property border: thickness style color;, for example border:3px dashed red. This example uses a solid (non-dashed) gray border that is one pixel wide:

Wikitext <syntaxhighlight lang=wikitext>

Left Center Right
Red star Orange star Green star
</syntaxhighlight>

Produces

Left Center Right
Red star Orange star Green star

Note the bottom-row texts are centered by style="text-align: center;" to match the centering of the stars in their cells.

As long as the File: specs omit the parameter |thumb they don't show the caption lines in the table (only during mouse-over). The border color darkgray matches typical tables or infoboxes in articles; however, it could be any color name (as in style="border: 1px solid darkgreen;") or use a hex-color (such as: #DDCCBB).

Border-collapse: conflicting or double bordersEdit

Wikitext <syntaxhighlight lang=wikitext>

A B C
D E F
</syntaxhighlight>

Produces

A B C
D E F

If all cells have the same border color, the resulting double borders may not be wanted; add the border-collapse: collapse; CSS property on the table opening tag to reduce them to single ones (cellspacing=... is obsolete).

Additionally, the W3C allows the use of the otherwise obsolete border= attribute on the table root ({|) if its value is "1". This adds a one-pixel border, in the default color, to the table and all of its cells at once:

Using the border-collapse property to combine the double borders, as described above:

Wikitext <syntaxhighlight lang=wikitext>

A B C
D E F
</syntaxhighlight>

Produces

A B C
D E F

Float table left or rightEdit

Two table classes floatleft and floatright (case sensitive) help floating the table and adjusting table margins so that they do not stick to the text. floatleft floats the table to the left and adjusts right margin. floatright does the opposite. Example:

Wikitext <syntaxhighlight lang=wikitext highlight=3,13> This paragraph is before the table.

Caption text
Header A Header B Header C
row 1 A row 1 B row 1 C
row 2 A row 2 B row 2 C
Caption text
Header A Header B Header C
row 1 A row 1 B row 1 C
row 2 A row 2 B row 2 C

... Lorem text after table </syntaxhighlight>

As it appears in a browser:

This paragraph is before the table.

Caption text
Header A Header B Header C
row 1 A row 1 B row 1 C
row 2 A row 2 B row 2 C
Caption text
Header A Header B Header C
row 1 A row 1 B row 1 C
row 2 A row 2 B row 2 C

Template:Lorem ipsum span


Alternatively, you can use CSS to get the same result:
{| class="wikitable" style="float:left; clear:left; margin-right:8px;"
{| class="wikitable" style="float:right; clear:right; margin-left:8px;"

This paragraph is before the table.

Caption text
Header A Header B Header C
row 1 A row 1 B row 1 C
row 2 A row 2 B row 2 C
Caption text
Header A Header B Header C
row 1 A row 1 B row 1 C
row 2 A row 2 B row 2 C

Template:Lorem ipsum span

Centering tablesEdit

{{#invoke:Shortcut|main}}

To center a table horizontally, use style Template:Kbd, which applies to the left and right margins. Text does not flow around centered tables as it does for floated tables; that is, no text appears to either side:

Wikitext <syntaxhighlight lang=wikitext highlight=2> Text before table...

Centered table
Duis aute irure
dolor in reprehenderit in voluptate velit
esse cillum dolore eu fugiat nulla pariatur.

...text after table </syntaxhighlight>

As it appears in a browser:

Text before table...

Centered table
Duis aute irure
dolor in reprehenderit in voluptate velit
esse cillum dolore eu fugiat nulla pariatur.

...text after table.

Style Template:Kbd may be combined with top and bottom margin in the standard way for CSS, e.g. <syntaxhighlight lang=wikitext inline>style="margin:1em auto"</syntaxhighlight> defines top and bottom margins of 1em, and automatic (centered) left and right margins.

Tip: For Android Chrome, use:

{| style="margin: auto; border: none;"Template:Efn

Note: align="center" is deprecated in HTML5, and does not work well in Mediawiki software. For example; it will not override the left alignment of tables via class=wikitable.

Static ('sticky') headersEdit

Headers can be frozen so they're always at the top (or left) as one scrolls through a large table. See Template:Tl and Template:Tl.

Nested tablesEdit

{{#invoke:Hatnote|hatnote}}

Nesting data tables with header cells makes it difficult for assistive screen readers to parse them sensibly.

Editors sometimes use headerless tables as an aid to content layout, especially where it is easier than the equivalent use of divs and CSS styling. For complex layouts, rowspan and colspan may be used, but again it is sometimes simpler and more maintainable to use nested tables.

Template:Em

In the following example, five different tables are shown nested inside the cells of a sixth, main table. None has any header cells. Automatically, the two tables |A| and |B|B| are vertically aligned instead of the usual side-by-side of text characters in a cell. float is used to fix each of tables |C| and |D| to their own position within one cell of the table. This may be used for charts and schematics.

α cell2
NESTED
TABLE
the original table again
A
B B
C
D

Wikitext: <syntaxhighlight lang=wikitext line highlight="4-8,11-17,19-24">

α cell2
NESTED
TABLE
the original table again
A
B B
C
D
</syntaxhighlight>

WidthEdit

Template:See also Note: width=X is obsolete in HTML 5, and so it could eventually be ignored by MediaWiki. See: Wikipedia: HTML 5#Table attributes. Use CSS styles or line breaks (<br>) instead.

Vertical headersEdit

Sometimes it is desirable (such as in a table predominantly made of numbers) to rotate text such that it proceeds from top to bottom or bottom to top instead of from left to right or right to left. This can be done with CSS but the easiest way on Wikipedia is to enclose the text of each heading in a Template:Tl template. For example: <syntaxhighlight lang="wikitext">

Template:Vertical header

</syntaxhighlight> If the text includes an equals sign then replace it with {{=}}.

Rotated column headers using Template:Tlx
Template:Vertical header Template:Vertical header Template:Vertical header Template:Vertical header Template:Vertical header Template:Vertical header Template:Vertical header Template:Vertical header Template:Vertical header Template:Vertical header
05/08 4266 7828 7282 1105 224 161 916 506 231
04/08 4127 6190 6487 1139 241 205 1165 478 301

If you want to use sticky headers with vertical headers it is important to make the sticky header less tall for cell phone use. {{abbr}} is one way. Also by moving some info to the table caption. See example with various methods at Template:Tl.

Line breaks in headersEdit

An editor who is blind says line breaks <br> are fine in this discussion here. If it is just two words in the column header, then a line break is simplest. Or if you want three words on separate lines in the header. But for longer header text, max-width is sometimes better, because when the viewport is narrow enough the browser may narrow the header to be less than the max-width setting. The browser often does this better than what line breaks allow in a narrow viewport.

Max-widthEdit

Narrowing columns with max-width style is fine; such as style="max-width:Xpx;" or style="max-width:Xem;" or other CSS units. The number by itself without units defaults to pixels.

See width examples on this subpage. There it is easier to narrow the browser window and not lose one's place as on a long page such as here on Help:Table. Overall table width does not act the same on Wikipedia mobile view as it does on mobile view on webpages outside Wikipedia. See the subpage examples.

Setting strict widths (style="width:Xpx;" or style="width:Xem;") is discouraged for the most part on Wikipedia because it interferes with the ability of the browser to adjust content to suit the browser window, device size, portrait view, landscape view, zoom settings, user-end font size choices, and other constraints. Verbose notes columns are almost always a problem, especially when there are more than a few other columns. Editors sometimes try to make the notes column wider, which messes up the other columns. For this reason, verbose notes columns should be avoided, or the notes should be shortened and links to longer notes below the table should be added instead.

style=max-width:Xem can be used in table headers. The following table excerpt is adapted from this version of List of countries by wealth per adult. The goal is to narrow the data columns, and have the country names spread out on one line each. All of this makes it easier when scanning down a country list. But the country names have to wordwrap if needed (in narrow portrait views on some cell phones, etc.). So style=max-width:Xem was used in selected column heads. Em units are good because they increase in size along with the zoom setting. It is important to check if the max-width you have chosen also works correctly in cell phones, and is not breaking words. You may need to increase it a bit. Here is the relevant header wikitext:

Wikitext <syntaxhighlight lang=wikitext highlight=6-8> Template:Static row numbersTemplate:Sticky headerTemplate:Table alignment