User:Gaia Octavia Agrippa/Adoption/Tables

Tables are important additions to wikipedia articles. Adding a table can take an article up from a start class article to a B-class article. Tables can be very simple or rather complex in the way they are made, however I will only show you the more simple tables because that is all you need to know for now.

The most basic table
The most basic table using the following code:


 * row 1, column 1 || row 1, column 2
 * row 2, column 1 || row 2, column 2
 * }
 * row 2, column 1 || row 2, column 2
 * }
 * }

OR (You can use either, they produce the same table)


 * row 1, column 1
 * row 1, column 2
 * row 2, column 1
 * row 2, column 2
 * }
 * row 2, column 1
 * row 2, column 2
 * }


 * This produces the following table:


 * Looking at the code needed to produce this table you can see:


 * {| = Start of table
 * |} = End of table
 * |- = New row of table
 * | = New column

The table that would normally be used
The following code can be accessed through the tool bar and is the table code most used around wikipedia.


 * {| class="wikitable" border="1"
 * ! header 1
 * ! header 2
 * ! header 3
 * row 1, column 1
 * row 1, column 2
 * row 1, column 3
 * row 2, column 1
 * row 2, column 2
 * row 2, column 3
 * }
 * row 2, column 2
 * row 2, column 3
 * }


 * This produces:


 * You will see that there are a couple of new editions:


 * class="wikitable" border="1" = This produces the border that surrounds the text
 * ! = This produces a header for a column

Occasionally used
This is a table that is used when multiple tables are shown next to each other and therefore require a heading each.


 * {| class="wikitable" border="1"
 * + Table heading
 * ! 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
 * }
 * row 2, cell 2
 * row 2, cell 3
 * }


 * This produces


 * You will see a new additon:


 * |+ = the table heading

When to use
You should use tables when list has too many extras. For example


 * Use for sports results


 * Use for awards won

The above table uses rowspan = "x" (when x is the number of rows you want a box to cover) instead of writing out the year more than one. You can also use this in any table as long as the row you want to stretch doesn't contain template (IE ).

Use the following code to add a rowspan