Help:Table: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
m (Robot: Removing template: BoxTop)
mNo edit summary
 
(34 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The following shows you how to create a table.__NOTOC__
The following shows you how to create a '''table'''.


==Code==
== MediaWiki syntax ==
To create a table, you will first need to understand what the symbols mean:
To create a table, you will first need to understand the basic wikitext syntax:


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


==Usage==
=== Usage ===
Here is how you would use these symbols appropriately:
Here is an example of how the syntax is combined to create a table:


<pre>
<pre>
{|
{|
|+ This is the caption for my table.
! These !! are !! my !! table !! headers
|-
| These || are || my || regular || cells
|-
| These || are || my || regular || cells
|}
</pre>
== Table types ==
=== Standard table ===
Add <code>class="wikitable"</code> right after the start of the table to apply the appropriate wiki styling:
<pre>{| class="wikitable"</pre>


|+ This is the caption for my table.
Some additional table classes that can be added are:
 
*<code>dk</code> - Applies a ''[[Donkey Kong (franchise)|Donkey Kong]]'' theme to the wikitable.
*<code>center</code> - Centers the table in the middle of the page.
*<code>sortable</code> - Adds JavaScript sorting to the table headers.
*<code>scrollable</code> - Adds horizontal scrolling to extra-wide tables.
*<code>autoresize</code> - Automatically downscales images in cramped tables.
*<code>sticky-header</code> - Keeps the header onscreen as the data is scrolled.
 
Multiple classes are simply separated by a space. For example:
 
<pre>{| class="wikitable dk sortable"</pre>
 
Note that <code>class="unsortable"</code> can be applied to header cells to remove the sorting ability for that column, and the <code>data-sort-value</code> attribute can be set for individual cells to change the text used for sorting.


==== Example ====
{| 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]]
|}


! These !! are !! my !! table !! headers
Here is the source code for the above table:


<pre>
{| 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]]
|}
</pre>
=== 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 <code>responsive</code> class to the table:


| These || are || my || regular || cells
<pre>{| class="wikitable responsive"</pre>
 
And then you add the <code>data-label</code> to each table cell (typically the same label used in the header):
 
<pre>| data-label="Answer 1" | Your wish is granted.</pre>
 
Note that responsive tables must avoid using <code>colspan</code> and <code>rowspan</code> so that information isn't lost in mobile mode.


==== Example ====
{| 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 [[Sir Grodus|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.
|}
|}
</pre>


==Styling==
Here is the source code for the above table:
To modify a specific cell, a row, or the entire table, you would use the ''style'' attribute:


Placing the style attribute after the '''{|''' symbol alters the entire table:
<pre>
<pre>
{| style="font-family: (a font family);border: (a thickness)"
{| 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 [[Sir Grodus|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.
|}
</pre>
</pre>
Placing the style attribute after the '''|+''' symbol alters the table's caption. Use the pipe symbol to divide it from the text:
<pre>
|+ style="font-family: (a font family);color: (# a color)" | This is the caption for my table.
</pre>
Placing the style attribute after the '''|-''' symbol alters the entire row that follows it:
<pre>
|- style="font-family: (a font family);color: (# a color)"
</pre>
Placing the style attribute after the '''|''' symbol alters a single cell. Use the pipe symbol to divide it from the text:
<pre>
| style="font-family: (a font family);color: (# a color)" | These || are || my || regular || cells
</pre>
Please note that styling a single cell has the most precedence. This means that if you style the table's background red, and style a single cell black, the single cell will appear black, rather than red.


== Example table ==
== Style changes ==
{| border=1 cellspacing=0 cellpadding=3 style="border-collapse:collapse"
A table's <code>style</code> attribute can be used to make additional adjustments to the wikitable format. Here are two of the most basic style changes:
!#
 
!Preview
;Adjust the table's width
!Event
:<code>style="width:50%"</code>
!Player's Characters
 
!''In-game Description'' (Objective)
;Center all text within the table
!Stage
:<code>style="text-align:center"</code>
 
Multiple properties are separated by the <code>;</code> character. Here's what the start of a table might look like with these properties applied:
 
<pre>{| class="wikitable center" style="width:50%;text-align:center"</pre>
 
=== Color customization ===
To customize the colors of a cell row, use a preceding row separator such as the following:
 
<pre>|- style="color:#fff;background:#FF2400"</pre>
 
To customize an individual cell, replace the leading <code>|</code> with syntax such as the following:
 
<pre>| style="background:#000" |</pre>
 
=== Example ===
{| class="wikitable" style="width:100%;text-align:center"
|- style="color:#fff;background:#FF2400"
! Image !! Name !! Description
|-
|-
!1
| style="background:#000" | [[File:SMB Princess Toadstool Sprite.png]]
![[Image:Events01.png|85px]]
| [[Princess Peach|Princess Toadstool]]
!Two Trouble Kings
| style="text-align:left" | 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.
|[[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
| style="background:#000" | [[File:SMB Mushroom Retainer Sprite.png]]
![[Image:C-02.png|85px]]
| [[Toad (species)|Mushroom retainers]]
!Master the Pokémon Tag Battle
| style="text-align:left" | 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!"
|[[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]]
Here is the source code for the above table:
 
<pre>
{| class="wikitable" style="width:100%;text-align:center"
|- style="color:#fff;background:#FF2400"
! Image !! Name !! Description
|-
|-
!3
| style="background:#000" | [[File:SMB Princess Toadstool Sprite.png]]
![[Image:C-03.png|85px]]
| [[Princess Peach|Princess Toadstool]]
!Fastest, Shortest, Sudden Death
| style="text-align:left" | 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.
|[[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
| style="background:#000" | [[File:SMB Mushroom Retainer Sprite.png]]
![[Image:C-04.png|85px]]
| [[Toad (species)|Mushroom retainers]]
!The DK Tag Calamity
| style="text-align:left" | 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!"
|[[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]]
|}
|}
</pre>
== Structure changes ==
The <code>colspan</code> and <code>rowspan</code> attributes can be set to a number and precede a cell definition to have the cell span that amount of columns or rows, respectively.


Here is the source code of the above table:
The <code>colspan</code> attribute can also be set to <tt>100%</tt> to span all columns.


<nowiki>{| border=1 cellspacing=0 cellpadding=3 style="border-collapse:collapse"</nowiki><br>
=== Example ===
<nowiki>!#</nowiki><br>
{| class="wikitable"
<nowiki>!Preview</nowiki><br>
! colspan="100%" | Shopping list
<nowiki>!Event</nowiki><br>
|-
<nowiki>!Player's Characters</nowiki><br>
| rowspan="2" | Bread & butter
<nowiki>!''In-game Description'' (Objective)</nowiki><br>
| Pie
<nowiki>!Stage</nowiki><br>
| Buns
<nowiki>|-</nowiki><br>
| Danish
<nowiki>!1</nowiki><br>
| colspan="2" | Croissant
<nowiki>![[Image:Events01.png|85px]]</nowiki><br>
|-
<nowiki>!Two Trouble Kings</nowiki><br>
| Cheese
<nowiki>|[[Mario]] and [[Kirby]]</nowiki><br>
| colspan="2" | Ice cream
<nowiki>|''Now there are TWO greedy kings? Having a buddy doesn't change their natures.'' (KO Bowser and King Dedede)</nowiki><br>
| Butter
<nowiki>|[[Delfino Plaza]]</nowiki><br>
| Yogurt
<nowiki>|-</nowiki><br>
|}
<nowiki>!2</nowiki><br>
<nowiki>![[Image:C-02.png|85px]]</nowiki><br>
<nowiki>!Master the Pokémon Tag Battle</nowiki><br>
<nowiki>|[[Pokémon Trainer]] and [[Pikachu]]</nowiki><br>
<nowiki>|''The Pokemon tournament's final challenge. Your rivals have the same Pokemon!'' (KO rival Pokemon Trainer, and Pikachu)</nowiki><br>
<nowiki>|[[Pokémon Stadium 2]]</nowiki><br>
<nowiki>|-</nowiki><br>
<nowiki>!3</nowiki><br>
<nowiki>![[Image:C-03.png|85px]]</nowiki><br>
<nowiki>!Fastest, Shortest, Sudden Death</nowiki><br>
<nowiki>|[[Yoshi]] and [[King Dedede]]</nowiki><br>
<nowiki>|''Only ten seconds left?! Beat as many foes as you can in Super Sudden Death and live!'' (survive 10 seconds at 300% damage)</nowiki><br>
<nowiki>|[[WarioWare, Inc. (stage)|WarioWare, Inc.]]</nowiki><br>
<nowiki>|-</nowiki><br>
<nowiki>!4</nowiki><br>
<nowiki>![[Image:C-04.png|85px]]</nowiki><br>
<nowiki>!The DK Tag Calamity</nowiki><br>
<nowiki>|[[Donkey Kong]] and [[Diddy Kong]]</nowiki><br>
<nowiki>|''DK and Diddy got tiny! Use lightning to help deal the final blow!'' (defeat all enemies while many Lightning Bolt items appear)</nowiki><br>
<nowiki>|[[Mario Circuit]]</nowiki><br>
<nowiki>|}</nowiki>


To use this coding successfully, just copy it, paste it on the article you need it for, and fill in the individual information.
Here is the source code for the above table:
 
<pre>
{| class="wikitable"
! colspan="100%" | Shopping list
|-
| rowspan="2" | Bread & butter
| Pie
| Buns
| Danish
| colspan="2" | Croissant
|-
| Cheese
| colspan="2" | Ice cream
| Butter
| Yogurt
|}
</pre>


{{Wikipolicy}}
{{MarioWiki}}
[[Category:Help|{{PAGENAME}}]]
{{Shortcut|SMW:TABLE}}
{{Shortcut|MW:TABLE}}
[[Category:Help]]

Latest revision as of 18:42, November 7, 2024

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"

Some additional table classes that can be added are:

  • dk - Applies a Donkey Kong theme to the wikitable.
  • 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.

Multiple classes are simply separated by a space. For example:

{| class="wikitable dk sortable"

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 Events01.png 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 C-02.png 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 C-03.png 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 C-04.png 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 [[Sir Grodus|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:50%"
Center all text within the table
style="text-align:center"

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

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

Color customization

To customize the colors of a 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" |

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" style="width:100%;text-align:center"
|- style="color:#fff;background:#FF2400"
! Image !! Name !! Description
|-
| style="background:#000" | [[File:SMB Princess Toadstool Sprite.png]]
| [[Princess Peach|Princess Toadstool]]
| style="text-align:left" | 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.
|-
| style="background:#000" | [[File:SMB Mushroom Retainer Sprite.png]]
| [[Toad (species)|Mushroom retainers]]
| style="text-align:left" | 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
|}