Help:Table

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search

The following shows you how to create a table.

MediaWiki syntax

To create a table, you will first need to understand the basic wikitext syntax:

  • {| - Signifies the start of a table.
  • |+ - Signifies the caption of a table; what text will appear above it, labeling it.
  • ! - Signifies the start of a header table cell. The text within a header cell is boldfaced and centered.
  • !! - Signifies the switch to a new header cell within a row.
  • |- - Signifies the start of a table row.
  • | - Signifies the start of a regular table cell.
  • || - Signifies the switch to a new cell within a row.
  • |} - Signifies the end of a table.

Usage

Here is an example of how the syntax is combined to create a table:

{|
|+ This is the caption for my table.
! These !! are !! my !! table !! headers
|-
| These || are || my || regular || cells
|-
| These || are || my || regular || cells
|}

Table types

Standard table

Add class="wikitable" right after the start of the table to apply the appropriate wiki styling:

{| class="wikitable"

Multiple classes are separated by a space. Some additional table classes that can be added are:

  • center - Centers the table in the middle of the page.
  • sortable - Adds JavaScript sorting to the table headers.
  • scrollable - Adds horizontal scrolling to extra-wide tables.
  • autoresize - Automatically downscales images in cramped tables.
  • sticky-header - Keeps the header onscreen as the data is scrolled.
  • colXleft - Where X is a number, align text in this column to the left (e.g. col3left).

Note that class="unsortable" can be applied to header cells to remove the sorting ability for that column, and the data-sort-value attribute can be set for individual cells to change the text used for sorting.

Example

# Preview Event Player's characters In-game description Stage
1 Super Smash Bros. Brawl event Two Trouble Kings Mario and Kirby Now there are TWO greedy kings? Having a buddy doesn't change their natures. (KO Bowser and King Dedede) Delfino Plaza
2 A Super Smash Bros. Brawl screenshot Master the Pokémon Tag Battle Pokémon Trainer and Pikachu The Pokemon tournament's final challenge. Your rivals have the same Pokemon! (KO rival Pokemon Trainer, and Pikachu) Pokémon Stadium 2
3 A Super Smash Bros. Brawl screenshot Fastest, Shortest, Sudden Death Yoshi and King Dedede Only ten seconds left?! Beat as many foes as you can in Super Sudden Death and live! (survive 10 seconds at 300% damage) WarioWare, Inc.
4 A Super Smash Bros. Brawl screenshot The DK Tag Calamity Donkey Kong and Diddy Kong DK and Diddy got tiny! Use lightning to help deal the final blow! (defeat all enemies while many Lightning Bolt items appear) Mario Circuit

Here is the source code for the above table:

{| class="wikitable sortable"
! #
! class="unsortable" | Preview
! Event
! class="unsortable" | Player's characters
! class="unsortable" | In-game description
! Stage
|-
! 1
| [[File:Events01.png|100px]]
| Two Trouble Kings
| [[Mario]] and [[Kirby]]
| ''Now there are TWO greedy kings? Having a buddy doesn't change their natures.'' (KO Bowser and King Dedede)
| [[Delfino Plaza]]
|-
! 2
| [[File:C-02.png|100px]]
| Master the Pokémon Tag Battle
| [[Pokémon Trainer]] and [[Pikachu]]
| ''The Pokemon tournament's final challenge. Your rivals have the same Pokemon!'' (KO rival Pokemon Trainer, and Pikachu)
| [[Pokémon Stadium 2]]
|-
! 3
| [[File:C-03.png|100px]]
| Fastest, Shortest, Sudden Death
| [[Yoshi]] and [[King Dedede]]
| ''Only ten seconds left?! Beat as many foes as you can in Super Sudden Death and live!'' (survive 10 seconds at 300% damage)
| [[WarioWare, Inc. (stage)|WarioWare, Inc.]]
|-
! 4
| [[File:C-04.png|100px]]
| The DK Tag Calamity
| [[Donkey Kong]] and [[Diddy Kong]]
| ''DK and Diddy got tiny! Use lightning to help deal the final blow!'' (defeat all enemies while many Lightning Bolt items appear)
| [[Mario Circuit]]
|}

Responsive table

Responsive tables look just like standard tables on wider desktop displays, but on narrow mobile displays they transform to show each row individually, with a given label for each cell.

To create a responsive table, the first step is to add the responsive class to the table:

{| class="wikitable responsive"

And then you add the data-label to each table cell (typically the same label used in the header):

| data-label="Answer 1" | Your wish is granted.

Note that responsive tables must avoid using colspan and rowspan so that information isn't lost in mobile mode.

Example

# Question Answer 1 Answer 2 Answer 3
1 What will happen if you collect seven Crystal Stars? Your wish is granted. The Thousand-Year Door opens. A thousand coins appear.
2 What is the goal of Grodus, leader of the X-Nauts? To conquer the world. To get rich. To become a superhero.
3 What is the legendary treasure that waits behind the Thousand-Year Door? 100,000,000 coins. An extremely rare badge. A 1,000-year-old demon's soul.
4 What does Sir Grodus wish to do with this ancient demon's soul? Cherish it always. Bring the demon back to life. Hang out with it.

Here is the source code for the above table:

{| class="wikitable responsive"
! # !! Question !! Answer 1 !! Answer 2 !! Answer 3
|-
! data-label="#" | 1
| data-label="Question" | What will happen if you collect seven [[Crystal Stars]]?
| data-label="Answer 1" | Your wish is granted.
| data-label="Answer 2" | [[The Thousand-Year Door]] opens.
| data-label="Answer 3" | A thousand [[coin]]s appear.
|-
! data-label="#" | 2
| data-label="Question" | What is the goal of [[Grodus]], leader of the [[X-Nauts (organization)|X-Nauts]]?
| data-label="Answer 1" | To conquer the world.
| data-label="Answer 2" | To get rich.
| data-label="Answer 3" | To become a superhero.
|-
! data-label="#" | 3
| data-label="Question" | What is the legendary treasure that waits behind the Thousand-Year Door?
| data-label="Answer 1" | 100,000,000 coins.
| data-label="Answer 2" | An extremely rare [[badge]].
| data-label="Answer 3" | A 1,000-year-old [[Shadow Queen|demon]]'s soul.
|-
! data-label="#" | 4
| data-label="Question" | What does Sir Grodus wish to do with this ancient demon's soul?
| data-label="Answer 1" | Cherish it always.
| data-label="Answer 2" | Bring the demon back to life.
| data-label="Answer 3" | Hang out with it.
|}

Style changes

A table's style attribute can be used to make additional adjustments to the wikitable format. Here are two of the most basic style changes:

Adjust the table's width
style="width:100%"
Center all text within the table
style="text-align:center"
Add space between the table cells
style="border-collapse:separate"

Multiple properties are separated by the ; character. Here's what the start of a table might look like with some of these properties applied:

{| class="wikitable center" style="width:100%;text-align:center"

However, the center table class and a width other than 100% should rarely be used. Most tables should be left-aligned on the page and not have any width set.

Series coloration

This guideline has been determined by a proposal, which passed on August 14, 2025.

The series coloration classes below can be used to style wikitables. Tables use one row background color by default; to enable alternating row colors, add the alt class (e.g. wikitable mario sm alt). To swap which color a given alternating table row uses, add the swap class to it. Apply any of the following classes to a table row or header cell to change its default coloration: banner, subbanner, header, subheader.

Series coloration is to be used for the corresponding game's page. Former subpages, or pages for non-series specific subjects, should not use series coloration. As of August 15th, 2025, alternative media (e.g. books, music albums, movies) are currently exempt from these series coloration guidelines.

Color chart

Series Border Banner Subbanner Header Subheader Backgrounds Class 1 Class 2
Standard Alternate
Super Mario General/misc #000#900 #B00#800 #D33#711 #D00#500 coral#550703 #FEE#200 #FDD#300 mario
Super Mario #C00#880700 #F40#721 red#550300 #FFAA50#551103 sm
Donkey Kong General/misc #000#852 #8B4513#804822 #A74#774B22 #B85#521 #CFBB88#531 #FFF8DC#220B00 #F5DEB3#331000 dk
Country / Land #883A11#731 #AB6543#631 #BB7022#520 burlywood#4C2707 dkc
Mario vs. Donkey Kong #000#A72 #AD541A#851 #E4843F#775011 #D2691E#520 #F6B377#4F3907 mvdk
Arcade #BB882A#997029 #CC981B#862 #EAB500#705517 #EEBB44#504710 arcade
Wario General/misc #000#A000A0 #909#707 #A42AA3#700570 #C0C#505 #E58DE2#470347 #FEF#202 #FDF#303 wario
WarioWare #7730AA#7700A0 #A44CD1#6C00A0 #93C#550070 #D89FE8#430057 ww
Wario Land #C0C#800080 #E323E3#808 #E2E#600060 #FE92FE#505 wl
Yoshi General/misc #000#00B300 #0B0#080 #00C600#171 #0D0#060 #83FF50#0C550C #F7FFF7#002C00 #E7FFE7#004000 yoshi
Yoshi #191#118011 #26A526#136613 #11C011#115F11 #8D7#0C4A0C yi
Luigi's Mansion #000#090 #070#070 #007E00#005A00 #0A0#050 #32CD32#030 #EFE#002C00 #DFD#004000 lm
Peach games #000#A27 #D29#901766 #FF54B8#901766 #FF3EAF#771150 #FFAEDD#500C44 #FFF6F7#220222 #FFE4E1#33032C peach
Sports games #000#691 #8C0#571 #AED75B#571 #ADFF2F#446607 #DDFF2F#335507 #F8FFEE#102C07 #EFD#17400C sport
Spinoffs Mario Kart #000#AA9000 #DB0#887000 #FFDF33#887000 #FFD700#705700 yellow#504000 #FFE#221C00 #FFC#332700 spinoff mk
Mario Party #000#B90 #E7E710#997C00 #FFFF48#887C00 #FCFC40#776000 #FF8#504E00 mp
Dr. Mario #000#A0A000 #D0CC00#880 #D6D500#771 #E9F600#771 #E9F600#551 dm
RPGs Paper Mario #000#00B #11A#009 #202DD5#009 #202DD5#070766 #8DBBF6#070766 #F0F8FF#113 #E0F0FF#114 rpg pm
Mario & Luigi #000#0AA #1AD#079 #66EAFF#058 #0DF#058 #9FF#072255 ml
Super Mario RPG #000#0077B5 #17C#159 #389DFF#148 #0AF#137 #9DD8F2#112755 smrpg
Crossovers General/misc #000#2B6 #296#296 #43BB99#275 #43BB99#275 #80E8C4#195538 #E7FFF0#132 #E0FFE3#114430 crossover
Super Smash Bros. #000#2A8 #20CC88#298 #4BFFC5#227770 #1FFFB9#227770 #9FFFEE#195550 ssb
Alternate media #000#B72 #E90#99700C #FFC300#962 #FB0#775517 #FE0#554017 #FFF7DD#291907 #FFF3CC#3A2211 media
Former subpages #000#45A #5C5CBB#348 #8B8CFF#348 #8B8CFF#237 #BBDDFA#192966 #E6E6FA#131333 #D8D8F7#151544 subpage
Consoles #000#999 #A0A0A0#888 #C5C5C5#555 #CFCFCF#555 #DDD#222 #F8F9FA#333 #F1F2F3#383838 console
Default #A2A9B1#666 #999#555 #9F9F9F#4D4D4D #EAECF0#444 #DDD#3C3C3C #F8F9FA#333 #F1F2F3#383838

Terminology

banner
header header header
subheader subheader
subbanner
header subheader cell cell cell
subheader cell cell cell
subbanner
header subheader cell cell cell
subheader cell cell cell

Custom coloration

To change the default cell background or border color, define the --bg and/or --border variable in the table's style property:

{| class="wikitable" style="--bg:#FFF5EE;--border:#C00"

To change the default background color of the cell rows on an even/odd basis, define the --evenbg and --oddbg variables instead of --bg:

{| class="wikitable" style="--evenbg:#FFE4C4;--oddbg:#FFF5EE"

To change the colors of a particular cell column, define the --bgX and/or --borderX variable, where X is the column number:

{| class="wikitable" style="--bg1:#000;--border1:#FFF"

To customize the colors of a particular cell row, use a preceding row separator such as the following:

|- style="color:#FFF;background:#FF2400"

To customize an individual cell, replace the leading | with syntax such as the following:

| style="background:#000" |

For color customization in dark mode, see Help:Dark mode § Wikitables.

Example

Image Name Description
Princess Peach in Super Mario Bros.. Princess Toadstool The princess of the Mushroom Kingdom. Bowser kidnaps her to prevent her from reversing the magic the Koopa used on the Mushroom People. She appears in the final course, 8-4 where she thanks Mario for rescusing her and offers a "new quest" for him.
A Mushroom Retainer from Super Mario Bros. Mushroom retainers Seven Mushroom People that are servants of the princess and prisoners of the Koopa. They appear in every castle except for the final one. Mario can rescue a retainer by finishing a castle in World 1 to World 7. They'll say, "Thank you Mario/Luigi! But our princess is in another castle!"

Here is the source code for the above table:

{| class="wikitable col3left" style="width:100%;text-align:center;--bg:#FFF5EE;--bg1:#000;--border:#C00;--border1:#FFF"
|- style="color:#FFF;background:#FF2400"
! Image !! Name !! Description
|-
| [[File:SMB Princess Toadstool Sprite.png]]
| [[Princess Peach|Princess Toadstool]]
| The princess of the Mushroom Kingdom. Bowser kidnaps her to prevent her from reversing the magic the Koopa used on the Mushroom People. She appears in the final course, [[World 8-4 (Super Mario Bros.)|8-4]] where she thanks Mario for rescusing her and offers a "[[Super Mario Bros.#Hard mode|new quest]]" for him.
|-
| [[File:SMB Mushroom Retainer Sprite.png]]
| [[Toad (species)|Mushroom retainers]]
| Seven Mushroom People that are servants of the princess and prisoners of the Koopa. They appear in every castle except for the final one. Mario can rescue a retainer by finishing a castle in World 1 to World 7. They'll say, "Thank you Mario/Luigi! But our princess is in another castle!"
|}

Structure changes

The colspan and rowspan attributes can be set to a number and precede a cell definition to have the cell span that amount of columns or rows, respectively.

The colspan attribute can also be set to 100% to span all columns.

Example

Shopping list
Bread & butter Pie Buns Danish Croissant
Cheese Ice cream Butter Yogurt

Here is the source code for the above table:

{| class="wikitable"
! colspan="100%" | Shopping list
|-
| rowspan="2" | Bread & butter
| Pie
| Buns
| Danish
| colspan="2" | Croissant
|-
| Cheese
| colspan="2" | Ice cream
| Butter
| Yogurt
|}

See also