User:Timeshifter/sandbox

Source mode toolbar

[edit]
Vector toolbar – default. Table icon is circled.
Monobook toolbar. Table icon is on the right end.

To automatically insert a table, click or (Insert a table) on the edit toolbar. In the Vector toolbar the table icon is in the "Advanced" menu.

The following wikitext is inserted when Insert a table is clicked.

{| class="wikitable"
|+ Caption text
|-
! Header text !! Header text !! Header text
|-
| Example || Example || Example
|-
| Example || Example || Example
|-
| Example || Example || Example
|}

The sample text ("Header text" or "Example") is intended to be replaced with actual data. Row numbers (1-3) and column letters (A-C) have been substituted below to help visualization.

Wikitext

{| class="wikitable"
|+ Caption text
|-
! Header A !! Header B !! Header C
|-
| row 1 A || row 1 B || row 1  C
|-
| row 2 A || row 2 B || row 2 C
|-
| row 3 A || row 3 B || row 3 C
|}

Produces:

Caption text
Header A Header B Header C
row 1 A row 1 B row 1 C
row 2 A row 2 B row 2 C
row 3 A row 3 B row 3 C

You can fill in the table while in source mode. Or use the visual editor (VE). To create more complex table structures in source mode with cells that span multiple rows or columns, see § Colspan and rowspan.