User:JonTheMon/Sandbox/Help:Tables
Help center •
Editing help •
Table editing help •
Archiving help •
Image help •
Suggestion help
Frequently asked questions • Support
Helper program •
Ask a game related question •
Ask a wiki related question
What is a table? | |
A table is a method for organizing data by arranging it in columns and rows. It provides a compact way to view data, while also allowing comparisons and sorting. |
How to use a table | |||||||||||||||||||||||||||||||
Here is an example of a basic table. {| |- ! header 1 ! header 2 ! header 3 |- | row 1, cell 1 | row 1, cell 2 | row 1, cell 3 |- | row 2, cell 1 | row 2, cell 2 | row 2, cell 3 |} The above example gives you a table that looks like this:
The entire table is encased with curly brackets and a vertical bar character (a pipe). So use {| table code goes here |} Every new row of a table must begin with a pipe and a hyphen There are two ways to add a cell to each row. Either make a new line and start it with a pipe {| |- |Cell 1 || Cell 2 || Cell 3 |- |Cell A |Cell B |Cell C |} Creates:
Formatting There are three ways to add formatting to a table: apply it to a whole table, apply it to a single row, or apply it to a single cell. Table formatting requires a little html knowledge. Whole table On the first line of your table, after the {| border = "1" |- |data1 || data2 |- |data3 |data4 |} Creates:
Single row On the line declaring each new row {| |- |data1 || data2 |- style="background:red" |data3 |data4 |} Creates:
Single cell For each cell of a table, you can specify additional properties that only apply to that cell. To do that you need to add {| |- | style="background:red" | data1 || style="background:blue" | data2 |- |data3 |style="background:yellow" |data4 |} Creates:
Notice that if you use the double pipes GWW standard formatting In many cases you will want your tables to look consistent with other tables on GWW. A template has been provided that will apply the styles to the whole table. {| {{STDT}} |- |data1 || data2 |- |data3 |data4 |} Creates:
For more information on how to use the template, go to {{STDT}}. Advanced For more information on how to use tables, go to the Help:Table at wikimedia. |