Difference between revisions of "User:Bromaelor/Sandbox"

From FamilySearch Wiki
Jump to navigation Jump to search
(table help)
Line 156: Line 156:
  
 
{| border="1" cellspacing="0"  cellpadding="5"
 
{| border="1" cellspacing="0"  cellpadding="5"
 +
|-
 +
| one
 +
| two
 +
| three
 +
|-
 +
| red
 +
| blue
 +
| green
 +
|}
 +
<br>
 +
 +
===width===
 +
-----
 +
 +
The '''width''' parameter determines the width of the table:
 +
 +
<pre><nowiki>
 +
{| border="1" cellspacing="0" cellpadding="5" width="50%"
 +
|-
 +
| one
 +
| two
 +
| three
 +
|-
 +
| red
 +
| blue
 +
| green
 +
|}
 +
</nowiki></pre>
 +
 +
which will result in:
 +
 +
{| border="1" cellspacing="0"  cellpadding="5" width="50%"
 +
|-
 +
| one
 +
| two
 +
| three
 +
|-
 +
| red
 +
| blue
 +
| green
 +
|}
 +
 +
===align===
 +
-----
 +
 +
The '''align''' parameter determines the horizontal alignment of the table:
 +
 +
<pre><nowiki>
 +
{| border="1" cellspacing="0" cellpadding="5" width="50%" align="center"
 +
|-
 +
| one
 +
| two
 +
| three
 +
|-
 +
| red
 +
| blue
 +
| green
 +
|}
 +
</nowiki></pre>
 +
 +
which will result in:
 +
 +
{| border="1" cellspacing="0"  cellpadding="5" width="50%" align="center"
 
|-
 
|-
 
| one
 
| one

Revision as of 13:44, 2 September 2008

A table is made up of a number of cells arranged into rows.

row 1, cell 1 row 1, cell 2 row 1, cell 3
row 2, cell 1 row 2, cell 2 row 2, cell 3


Creating tables using Wikitext[edit | edit source]

Tables begin with:

{|

and end with:

|}

Each row within the table begins with:

|-

and is followed by the contents of each cell within that row, each on a new line, and beginning with a:

|

For example:

{|
|-
| one
| two
| three
|-
| red
| blue
| green
|}

which will result in:

one two three
red blue green


Additional formatting features are available:

border[edit | edit source]


The border parameter determines the thickness of the gridlines within the table:

{| border="1"
|-
| one
| two
| three
|-
| red
| blue
| green
|}

which will result in:

one two three
red blue green


cellspacing[edit | edit source]


The cellspacing parameter determines the space between individual cells within the table:

{| border="1" cellspacing="0"
|-
| one
| two
| three
|-
| red
| blue
| green
|}

which will result in:

one two three
red blue green


cellpadding[edit | edit source]


The cellpadding parameter determines the space surrounding the contents of the individual cells within the table:

{| border="1" cellspacing="0" cellpadding="5"
|-
| one
| two
| three
|-
| red
| blue
| green
|}

which will result in:

one two three
red blue green


width[edit | edit source]


The width parameter determines the width of the table:

{| border="1" cellspacing="0" cellpadding="5" width="50%"
|-
| one
| two
| three
|-
| red
| blue
| green
|}

which will result in:

one two three
red blue green

align[edit | edit source]


The align parameter determines the horizontal alignment of the table:

{| border="1" cellspacing="0" cellpadding="5" width="50%" align="center"
|-
| one
| two
| three
|-
| red
| blue
| green
|}

which will result in:

one two three
red blue green