Help:Table

From the Super Mario Wiki, the Mario encyclopedia
Revision as of 06:26, January 17, 2009 by Dom (talk | contribs) (→‎Styling: Because a user told me that he was completely confused by this help page and it did not help him, I added an example table as well as the source shown below it. Easier for new users.)
Jump to navigationJump to search

Here's how to create a table:

Code

To create a table, you will first need to understand what the symbols mean:

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

Usage

Here is how you would use these symbols appropriately:

{|

|+ This is the caption for my table.

|-

! These !! are !! my !! table !! headers

|-

| These || are || my || regular || cells

|}

Styling

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:

{| style="font-family: (a font family);border: (a thickness)"

Placing the style attribute after the |+ symbol alters the table's caption. Use the pipe symbol to divide it from the text:

|+ style="font-family: (a font family);color: (# a color)" | This is the caption for my table.

Placing the style attribute after the |- symbol alters the entire row that follows it:

|- style="font-family: (a font family);color: (# a color)"

Placing the style attribute after the | symbol alters a single cell. Use the pipe symbol to divide it from the text:

| style="font-family: (a font family);color: (# a color)" | These || are || my || regular || cells

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.

An Example Table


# Preview Event Player's Characters In-game Description (Objective) 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 of the above table:

{| border=1 cellspacing=0 cellpadding=3 style="border-collapse:collapse" !# !Preview !Event !Player's Characters !''In-game Description'' (Objective) !Stage |- !1 ![[Image:Events01.png|85px]] !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 ![[Image:C-02.png|85px]] !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 ![[Image:C-03.png|85px]] !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 ![[Image:C-04.png|85px]] !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]] |}


Important: To use this coding successfully, you must copy it from the source of this page. To do so, click on the Edit button on the far right of the page, in line with the "An Example Table" header. Then, copy all the text in-between the <nowiki> and </nowiki>. (these are to show the code without activating it)