User:Bejinhan/Adoption/Tables

Introduction
Tables organize information that is presented in a row-and-column format. Before changing a list into table format, consider whether the information will be better and more clearly conveyed through rows-and-column format. If there is no obvious benefit to changing the list to rows-and-column format(i.e. table format) then it is better to leave the list as it is.

Examples of information that can be put into table format are lists of information such as:-
 * 1) Person, birthdate, occupation
 * 2) Artist, album, year, and label

Table formatting
There are 2 different type of code you can use to write a table. Both will eventually produce the same table. You can use...


 * {| class="wikitable" border="1"
 * ! 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
 * }

or...


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

Both will produce the same results...

Wiki-table code
|+ produces the table heading {| is used for the start of the table |} is used for the end of the table |- produces a new row for the table | produces a new column ! produces a header for the column |rowspan = "x" |' Use a rowspan if you have more than one item for a year. For example, if you are doing a filmography table and the actor/actress has acted in two films in one year, use a rowspan to indicate the number of rows. Replace x with the numbers of rows you want.

Here is an example of a table with a rowspan.

Always use the pre-formatted class="wikitable"  format or anyone of the related format instead manually coding a complex HTML table. This will make it hard for other users to edit the table.

Examples of tables
Filmography table

Awards table

Tasks
Please click here for your tasks.