Difference between revisions of "Help:How to make tables"

From Birocapedia
Jump to navigationJump to search
 
(95 intermediate revisions by the same user not shown)
Line 1: Line 1:
Tables can help you put a lot of information in to a concentrated space. They are a little bit difficult to make so only read this if you are already farmiliar with how text formatting works. To start a table make a line with just "{|" and nothing else. On the next line put "|-" which means you are starting to put information in for the first row of the table. On the next line put a "|" which means you are making a cell in the row and put the contents of that cell on the rest of the line. On the next line put an other "|" and the contents of the second cell. To start the second row put "|- on the next line to signify a new row. Make a line at the end with "|}" to finish the table. Below you can see an example of what you would type to make a table and what it makes in the article.
+
Tables can help you organize and contain information in an article. Making table is an advanced kind of wiki formatting so only read this if you are already comfortable with other formatting.  
==A simple table==
+
 
 +
== Making a table ==
 +
To start a table make a line with just {| and nothing else. On the next line put a | which means you are making a cell in the first row and put the contents of that cell on the rest of the line. On the next line you can put another | and the contents of the second cell if you have one. Make as many cells in a row as you want using more lines starting with |. To start the second row put |- on the next line to signify a new row. Think of it as making a table row by row. To finish the table make a line at the end with |}. You can put whatever you want in the cells of a table: text, images, links, even tables. By default a table does not have a border, to make a it have a border add class="wikitable" after the {| on the first line.
 +
 
 +
===Examples===
 +
Below there is an example of a table without borders and an example of a table with borders.
 +
{|
 +
!You type
 +
!You see
 +
|-
 +
|A table without borders
 +
|<pre>
 +
{|
 +
|Red
 +
|Green
 +
|-
 +
|Yellow
 +
|Blue
 +
|}
 +
</pre>
 +
|
 +
{|
 +
|Red
 +
|Green
 +
|-
 +
|Yellow
 +
|Blue
 +
|}
 +
|-
 +
|A table with borders
 +
|<pre>
 +
{| class="wikitable"
 +
|Red
 +
|Green
 +
|-
 +
|Yellow
 +
|Blue
 +
|}
 +
</pre>
 +
|
 +
{| class="wikitable"
 +
|Red
 +
|Green
 +
|-
 +
|Yellow
 +
|Blue
 +
|}
 +
|}
 +
 
 +
==Extra elements==
 +
There are a few extra parts you can add to a table to make the information more clear. The chart below outlines how to make them.
 +
{|class="wikitable"
 +
!width="25%"|Element
 +
!width="25%"|Description
 +
!width="25%"|Usage
 +
!width="25%"|Example
 +
|-
 +
|Headers on top of the columns
 +
|To make bold headers appear on top of the columns, make a number equal to the number of columns of new lines between the line that initiates the table and the line that starts the first row, starting each new line with an exclamation point. After the first exclamation point put the words of the first header, after the second exclamation point the words of the second header, and so on. After you type in the headers it is important that you start the first row of cells with a line that has <nowiki>|-</nowiki> even though it is the first row.
 +
|<pre>
 +
{|class="wikitable"
 +
!Cabin
 +
!Number of campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
</pre>
 +
|
 +
{|class="wikitable"
 +
!Cabin
 +
!Number of campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
|-
 +
|Headers on rows
 +
|To make headers at the start of each row of a table, add a line with a ! followed by the words of the header before the lines for the cells, in each row.
 +
|<pre>
 +
{| class="wikitable"
 +
!Name
 +
|Adric A.
 +
|Will B.
 +
|Teddy B.
 +
|-
 +
!Seal time
 +
|1:28
 +
|1:48
 +
|1:32
 +
|}
 +
</pre>
 +
|
 +
{| class="wikitable"
 +
!Name
 +
|Adric A.
 +
|Will B.
 +
|Teddy B.
 +
|-
 +
!Seal time
 +
|1:28
 +
|1:48
 +
|1:32
 +
|}
 +
|-
 +
|A title
 +
|To add a title to a table, make a new line after the line that initiates the table and in that new line type <nowiki>|+</nowiki> followed by that words of the tile. In the example the table also includes headers on the columns.
 +
|<pre>
 +
{|class="wikitable"
 +
|+Some Birch Rock cabins
 +
!Cabin
 +
!Campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
</pre>
 +
|
 +
{|class="wikitable"
 +
|+Some Birch Rock cabins
 +
!Cabin
 +
!Campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
|}
 +
 
 +
==Table attributes==
 +
A table's color, position, width, and other characteristics can be modified by adding attributes to it. Below there is a list of all of the modifications that can be applied to a table. An attribute is always put after the first part of the line <nowiki>({|, !, |+, |)</nowiki> like this <nowiki>{|width="100%"</nowiki> and for places where you are writing text after the attribute you need to put a pipe in between the attribute and text like this <nowiki>|colspan="2"|text</nowiki>.
 +
{|class="wikitable"
 +
!width="25%"|Modification
 +
!width="25%"|How to do it
 +
!width="25%"|Example
 +
!width="25%"|Result
 +
|-
 +
|Put a caption at the bottom of a table
 +
|Add <pre>align="bottom"|</pre> after the <nowiki>|+</nowiki> part of the header line. After the pipe add the text of the header.
 +
|<pre>{|class="wikitable"
 +
|+align="bottom"|Caption
 +
!Cabin
 +
!Campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}</pre>
 +
|
 +
{|class="wikitable"
 +
|+align="bottom"|Caption
 +
!Cabin
 +
!Campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
|}
 +
 
 +
===Attributes on headers===
 +
{|width="100%"
 +
!You type
 +
!You get
 +
|-
 +
|width="50%"|
 +
<pre>
 +
{|border="1"
 +
!align="right" style="color:green;"|Cabin
 +
!style="background-color:black;color:white"|Campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
</pre>
 +
|width="50%"|
 +
{|border="1"
 +
!align="right" style="color:green;"|Cabin
 +
!style="background-color:black;color:white"|Campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
|}
 +
 
 +
==Justification==
 +
You can make a table appear on the right or middle of a page by using the align attribute like this: {|align="right". You can also set it to "center". If you want to make the table be in the center and have it have a border you can add multiple attributes to it like this: {|align="right" border="1". Below you can see some examples.
 +
===Right===
 +
{|width="100%"
 +
!You type
 +
!You get
 +
|-
 +
|width="50%"|
 +
<pre>
 +
{|align="right" border="1"
 +
!Cabin
 +
!Campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
</pre>
 +
|width="50%"|
 +
{|align="right" border="1"
 +
!Cabin
 +
!Campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
|}
 +
===Center===
 +
{|width="100%"
 +
!You type
 +
!You get
 +
|-
 +
|width="50%"|
 +
<pre>
 +
{|align="center" border="1"
 +
!Cabin
 +
!Campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
</pre>
 +
|width="50%"|
 +
{|align="center" border="1"
 +
!Cabin
 +
!Campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
|}
 +
 
 +
===Attributes on captions===
 +
You can put some attributes on captions by adding the attribute after the |+ and putting another | after the attribute like this.
 
{|width="100%"
 
{|width="100%"
 +
!You type
 +
!You get
 +
|-
 +
|width="50%"|
 +
<pre>
 +
{|border="1"
 +
|+align="bottom" style="color:red"|Some Birch Rock cabins
 +
!Cabin
 +
!Campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
</pre>
 +
|width="50%"|
 +
{|border="1"
 +
|+align="bottom" style="color:red"|Some Birch Rock cabins
 +
!Cabin
 +
!Campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
|}
 +
 +
==Colors==
 +
You can make the text and border of a table a different color and the background a different color with the style attribute. After the {| in the first line you can add style="color:green;background-color:blue;", for example, to make the text and borders green and the backround blue. To change just the text color find how on the [[Help:How to format text|text formatting page]].
 +
===Change the text and border color===
 +
{|width="100%"
 +
!You type
 +
!You get
 +
|-
 +
|width="50%"|
 +
<pre>
 +
{|border="1" style="color:green;"
 +
!Cabin
 +
!Campers
 +
|-
 +
|Cabin 1
 +
|4
 
|-
 
|-
|width="50%"|''You type''
+
|Cabin 6
|width="50%"|''You get''
+
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
</pre>
 +
|width="50%"|
 +
{|border="1" style="color:green;"
 +
!Cabin
 +
!Campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
|}
 +
 
 +
===Change the background color===
 +
{|width="100%"
 +
!You type
 +
!You get
 
|-
 
|-
 
|width="50%"|
 
|width="50%"|
 
<pre>
 
<pre>
{|
+
{|border="1" style="background-color:blue;"
 +
!Cabin
 +
!Campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
</pre>
 +
|width="50%"|
 +
{|border="1" style="background-color:blue;"
 +
!Cabin
 +
!Campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
|}
 +
===Change both the text and border color and the background color===
 +
{|width="100%"
 +
!You type
 +
!You get
 +
|-
 +
|width="50%"|
 +
<pre>
 +
{|border="1" style="color:white;background-color:black;"
 +
!Cabin
 +
!Campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
</pre>
 +
|width="50%"|
 +
{|border="1" style="color:white;background-color:black;"
 +
!Cabin
 +
!Campers
 +
|-
 +
|Cabin 1
 +
|4
 +
|-
 +
|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
|}
 +
 
 +
==Attributes on rows==
 +
You can add attributes to a single row in a table by adding them after the |- that started that row.
 +
{|width="100%"
 +
!You type
 +
!You get
 +
|-
 +
|width="50%"|
 +
<pre>
 +
{|border="1"
 +
!Cabin
 +
!Campers
 +
|-align="right"
 +
|Cabin 1
 +
|4
 +
|-style="color:green;"
 +
|Cabin 6
 +
|4
 +
|-align="center"
 +
|Eagle's Nest
 +
|8
 +
|-style="background-color:purple;color:yellow;"
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
</pre>
 +
|width="50%"|
 +
{|border="1"
 +
!Cabin
 +
!Campers
 +
|-align="right"
 +
|Cabin 1
 +
|4
 +
|-style="color:green;"
 +
|Cabin 6
 +
|4
 +
|-align="center"
 +
|Eagle's Nest
 +
|8
 +
|-style="background-color:purple;color:yellow;"
 +
|Buzzard's Roost
 +
|8
 +
|}
 +
|}
 +
==Attributes on cells==
 +
You can add attributes to individual cells by adding the attibute after the | for that cell and after that putting another | before the content of that cell.
 +
{|width="100%"
 +
!You type
 +
!You get
 +
|-
 +
|width="50%"|
 +
<pre>
 +
{|border="1"
 +
!Cabin
 +
!Campers
 +
|-
 +
|align="right"|Cabin 1
 +
|align="center"|4
 +
|-
 +
|style="color:green;"|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|style="background:purple;color:yellow;"|8
 +
|}
 +
</pre>
 +
|width="50%"|
 +
{|border="1"
 +
!Cabin
 +
!Campers
 +
|-
 +
|align="right"|Cabin 1
 +
|align="center"|4
 +
|-
 +
|style="color:green;"|Cabin 6
 +
|4
 +
|-
 +
|Eagle's Nest
 +
|8
 +
|-
 +
|Buzzard's Roost
 +
|style="background:purple;color:yellow;"|8
 +
|}
 +
|}
 +
 
 +
==Cells that span multiple columns==
 +
You can make a cell span multiple columns by adding an attibute to that cell called colspan.
 +
{|width="100%"
 +
!You type
 +
!You get
 +
|-
 +
|width="50%"|
 +
<pre>
 +
{|border="1"
 +
!Cabin
 +
!Campers
 
|-
 
|-
|''Cabin''
+
|colspan="2"|lower camp
|''Number of campers''
 
 
|-
 
|-
 
|Cabin 1
 
|Cabin 1
Line 18: Line 623:
 
|Cabin 6
 
|Cabin 6
 
|4
 
|4
 +
|-
 +
|colspan="2"|upper camp
 
|-
 
|-
 
|Eagle's Nest
 
|Eagle's Nest
Line 27: Line 634:
 
</pre>
 
</pre>
 
|width="50%"|
 
|width="50%"|
{|
+
{|border="1"
 +
!Cabin
 +
!Campers
 
|-
 
|-
|''Cabin''
+
|colspan="2"|lower camp
|''Number of campers''
 
 
|-
 
|-
 
|Cabin 1
 
|Cabin 1
Line 37: Line 645:
 
|Cabin 6
 
|Cabin 6
 
|4
 
|4
 +
|-
 +
|colspan="2"|upper camp
 
|-
 
|-
 
|Eagle's Nest
 
|Eagle's Nest
Line 45: Line 655:
 
|}
 
|}
 
|}
 
|}
To make the thing above I actually used a table. I made a row with a cell ''You type'' and a cell ''You get''. Then I made a new row with a cell for the box with the code in it and a cell with a table inside it (you can put tables inside tables). Using a table was the only way I could have made it look like that. Tables can give you a lot of control over your page. As you can see, the table above does not have and lines between the cells. Read on to see how you can add atributes like this to tables.
 

Latest revision as of 14:27, 17 February 2009

Tables can help you organize and contain information in an article. Making table is an advanced kind of wiki formatting so only read this if you are already comfortable with other formatting.

Making a table

To start a table make a line with just {| and nothing else. On the next line put a | which means you are making a cell in the first row and put the contents of that cell on the rest of the line. On the next line you can put another | and the contents of the second cell if you have one. Make as many cells in a row as you want using more lines starting with |. To start the second row put |- on the next line to signify a new row. Think of it as making a table row by row. To finish the table make a line at the end with |}. You can put whatever you want in the cells of a table: text, images, links, even tables. By default a table does not have a border, to make a it have a border add class="wikitable" after the {| on the first line.

Examples

Below there is an example of a table without borders and an example of a table with borders.

You type You see
A table without borders
{|
|Red
|Green
|-
|Yellow
|Blue
|}
Red Green
Yellow Blue
A table with borders
{| class="wikitable"
|Red
|Green
|-
|Yellow
|Blue
|}
Red Green
Yellow Blue

Extra elements

There are a few extra parts you can add to a table to make the information more clear. The chart below outlines how to make them.

Element Description Usage Example
Headers on top of the columns To make bold headers appear on top of the columns, make a number equal to the number of columns of new lines between the line that initiates the table and the line that starts the first row, starting each new line with an exclamation point. After the first exclamation point put the words of the first header, after the second exclamation point the words of the second header, and so on. After you type in the headers it is important that you start the first row of cells with a line that has |- even though it is the first row.
{|class="wikitable"
!Cabin
!Number of campers
|-
|Cabin 1
|4
|-
|Cabin 6
|4
|-
|Eagle's Nest
|8
|-
|Buzzard's Roost
|8
|}
Cabin Number of campers
Cabin 1 4
Cabin 6 4
Eagle's Nest 8
Buzzard's Roost 8
Headers on rows To make headers at the start of each row of a table, add a line with a ! followed by the words of the header before the lines for the cells, in each row.
{| class="wikitable"
!Name
|Adric A.
|Will B.
|Teddy B.
|-
!Seal time
|1:28
|1:48
|1:32
|}
Name Adric A. Will B. Teddy B.
Seal time 1:28 1:48 1:32
A title To add a title to a table, make a new line after the line that initiates the table and in that new line type |+ followed by that words of the tile. In the example the table also includes headers on the columns.
{|class="wikitable"
|+Some Birch Rock cabins
!Cabin
!Campers
|-
|Cabin 1
|4
|-
|Cabin 6
|4
|-
|Eagle's Nest
|8
|-
|Buzzard's Roost
|8
|}
Some Birch Rock cabins
Cabin Campers
Cabin 1 4
Cabin 6 4
Eagle's Nest 8
Buzzard's Roost 8

Table attributes

A table's color, position, width, and other characteristics can be modified by adding attributes to it. Below there is a list of all of the modifications that can be applied to a table. An attribute is always put after the first part of the line ({|, !, |+, |) like this {|width="100%" and for places where you are writing text after the attribute you need to put a pipe in between the attribute and text like this |colspan="2"|text.

Modification How to do it Example Result
Put a caption at the bottom of a table Add
align="bottom"|
after the |+ part of the header line. After the pipe add the text of the header.
{|class="wikitable"
|+align="bottom"|Caption
!Cabin
!Campers
|-
|Cabin 1
|4
|-
|Cabin 6
|4
|-
|Eagle's Nest
|8
|-
|Buzzard's Roost
|8
|}
Caption
Cabin Campers
Cabin 1 4
Cabin 6 4
Eagle's Nest 8
Buzzard's Roost 8

Attributes on headers

You type You get
{|border="1"
!align="right" style="color:green;"|Cabin
!style="background-color:black;color:white"|Campers
|-
|Cabin 1
|4
|-
|Cabin 6
|4
|-
|Eagle's Nest
|8
|-
|Buzzard's Roost
|8
|}
Cabin Campers
Cabin 1 4
Cabin 6 4
Eagle's Nest 8
Buzzard's Roost 8

Justification

You can make a table appear on the right or middle of a page by using the align attribute like this: {|align="right". You can also set it to "center". If you want to make the table be in the center and have it have a border you can add multiple attributes to it like this: {|align="right" border="1". Below you can see some examples.

Right

You type You get
{|align="right" border="1"
!Cabin
!Campers
|-
|Cabin 1
|4
|-
|Cabin 6
|4
|-
|Eagle's Nest
|8
|-
|Buzzard's Roost
|8
|}
Cabin Campers
Cabin 1 4
Cabin 6 4
Eagle's Nest 8
Buzzard's Roost 8

Center

You type You get
{|align="center" border="1"
!Cabin
!Campers
|-
|Cabin 1
|4
|-
|Cabin 6
|4
|-
|Eagle's Nest
|8
|-
|Buzzard's Roost
|8
|}
Cabin Campers
Cabin 1 4
Cabin 6 4
Eagle's Nest 8
Buzzard's Roost 8

Attributes on captions

You can put some attributes on captions by adding the attribute after the |+ and putting another | after the attribute like this.

You type You get
{|border="1"
|+align="bottom" style="color:red"|Some Birch Rock cabins
!Cabin
!Campers
|-
|Cabin 1
|4
|-
|Cabin 6
|4
|-
|Eagle's Nest
|8
|-
|Buzzard's Roost
|8
|}
Some Birch Rock cabins
Cabin Campers
Cabin 1 4
Cabin 6 4
Eagle's Nest 8
Buzzard's Roost 8

Colors

You can make the text and border of a table a different color and the background a different color with the style attribute. After the {| in the first line you can add style="color:green;background-color:blue;", for example, to make the text and borders green and the backround blue. To change just the text color find how on the text formatting page.

Change the text and border color

You type You get
{|border="1" style="color:green;"
!Cabin
!Campers
|-
|Cabin 1
|4
|-
|Cabin 6
|4
|-
|Eagle's Nest
|8
|-
|Buzzard's Roost
|8
|}
Cabin Campers
Cabin 1 4
Cabin 6 4
Eagle's Nest 8
Buzzard's Roost 8

Change the background color

You type You get
{|border="1" style="background-color:blue;"
!Cabin
!Campers
|-
|Cabin 1
|4
|-
|Cabin 6
|4
|-
|Eagle's Nest
|8
|-
|Buzzard's Roost
|8
|}
Cabin Campers
Cabin 1 4
Cabin 6 4
Eagle's Nest 8
Buzzard's Roost 8

Change both the text and border color and the background color

You type You get
{|border="1" style="color:white;background-color:black;"
!Cabin
!Campers
|-
|Cabin 1
|4
|-
|Cabin 6
|4
|-
|Eagle's Nest
|8
|-
|Buzzard's Roost
|8
|}
Cabin Campers
Cabin 1 4
Cabin 6 4
Eagle's Nest 8
Buzzard's Roost 8

Attributes on rows

You can add attributes to a single row in a table by adding them after the |- that started that row.

You type You get
{|border="1"
!Cabin
!Campers
|-align="right"
|Cabin 1
|4
|-style="color:green;"
|Cabin 6
|4
|-align="center"
|Eagle's Nest
|8
|-style="background-color:purple;color:yellow;"
|Buzzard's Roost
|8
|}
Cabin Campers
Cabin 1 4
Cabin 6 4
Eagle's Nest 8
Buzzard's Roost 8

Attributes on cells

You can add attributes to individual cells by adding the attibute after the | for that cell and after that putting another | before the content of that cell.

You type You get
{|border="1"
!Cabin
!Campers
|-
|align="right"|Cabin 1
|align="center"|4
|-
|style="color:green;"|Cabin 6
|4
|-
|Eagle's Nest
|8
|-
|Buzzard's Roost
|style="background:purple;color:yellow;"|8
|}
Cabin Campers
Cabin 1 4
Cabin 6 4
Eagle's Nest 8
Buzzard's Roost 8

Cells that span multiple columns

You can make a cell span multiple columns by adding an attibute to that cell called colspan.

You type You get
{|border="1"
!Cabin
!Campers
|-
|colspan="2"|lower camp
|-
|Cabin 1
|4
|-
|Cabin 6
|4
|-
|colspan="2"|upper camp
|-
|Eagle's Nest
|8
|-
|Buzzard's Roost
|8
|}
Cabin Campers
lower camp
Cabin 1 4
Cabin 6 4
upper camp
Eagle's Nest 8
Buzzard's Roost 8