User:RobbieIanMorrison/sandbox/table


 * Help:Table
 * Manual of Style/Tables

Basic table


Aligned table 1


Aligned table 2
Although not usually recommended, the  is necessary for the final header here.



Aligned table 3


Subhead row


Table classes
 class="wikitable center" class="wikitable" align="right" class="wikitable sortable" class="wikitable collapsible collapsed"

Special templates

 * Template:Dunno — full list of table-related templates for special values
 * is designed for use in tables



Cell colors

 * style="background-color: #CFEEB2" | entry

Specific markup
Right pad a column (assumes left-alignment), chould also add  for wide tables


 * Longest entry

Set minimum column width (in this case $1$)


 * style="width: 10em" | Any entry

Prevent wrapping of text (choose one)


 * style="white-space: nowrap" | Longest entry
 * Longest entry
 * Longest entry

Scientific units (set non-bold) in header

 ! Hydropower [GWh]

Left align a cell


 * align="left" | Capacity Added || || 7,329 || 7,482 || 5,589 || 4,247 || 2,889 || 1,401

Cell emphasis (renders bold with gray background) — use in vertical format as indicated and need not be in the first column

 ! Emphasized cell
 * entry

Controlled linebreaks in a cell (preferred to )


 * Item 1

Item 2
 * Item 1

Item 2

Scrolled table (not recommended in article space) (see also table classes)



Side-by-side tables
<pre style="font-size: 90%"> {|
 * style="vertical-align: top" |


 * style="vertical-align: top" |
 * style="vertical-align: top" |


 * }

Horizontal block
<pre style="font-size: 90%">

Comments table
<pre style="font-size: 90%">

Infobox mockup
<pre style="font-size: 90%">

Bar chart

 * Template:Bar chart
 * bar chart handles up to 4 columns and 25 rows of data
 * can add comments via comment1

<pre style="font-size: 90%">