The Wayback Machine - https://web.archive.org/web/20111004150135/http://en.wikipedia.org/wiki/Help:Wikitable

Help:Wikitable

From Wikipedia, the free encyclopedia
Jump to: navigation, search

A wikitable is an arrangement of columns and rows used to organize and position data. Tables are useful, and there are many ways and tricks that can be used.

The edit toolbar is shown above the editing window (Vector toolbar - default).
Monobook toolbar

When editing pages a generic wikitable can be added with the Vector toolbar insert table button.png or Button insert table.png (Insert a table) link in the edit toolbar. The following text is inserted when "Insert a table" is clicked:

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

The sample text ("header 1", "row 1, cell 1" etc) is to be replaced with actual data.


Contents

[edit] Wiki table markup summary

{|
table start
|+
table caption, optional; only between table start and first table row
|-
table row, optional on first row -- wiki engine assumes the first row
!
table header cell, optional. Consecutive table header cells may be added on same line separated by double marks (!!) or start on new lines, each with its own single mark (!).
|
table data cell, required! Consecutive table data cells may be added on same line separated by double marks (||) or start on new lines, each with its own single mark (|).
|}
table end

[edit] Examples

[edit] A simple table

{|
| A simple table
|}

As it appears in a browser:

A simple table


[edit] A more complex example

{| class="wikitable" style="text-align:center; width:80%;"
|+ Table caption
|-
|
! scope="col" | Header col. A
! scope="col" | Header col. B
! scope="col" | Header col. C
! scope="col" | Header col. D
|-
! scope="row" | Header row 1
|cell R1-A
|cell R1-B
|cell R1-C
|cell R1-D
|-
! scope="row" | Header row 2
|cell R2-A
|cell R2-B
|cell R2-C
|cell R2-D
|-
! scope="row" | Header row 3
|cell R3-A
|cell R3-B
|cell R3-C
|cell R3-D
|-
! scope="row" | Header row 4
|cell R4-A
|cell R4-B
|cell R4-C
|cell R4-D
|}

As it appears in a browser:

Table caption
Header col. A Header col. B Header col. C Header col. D
Header row 1 cell R1-A cell R1-B cell R1-C cell R1-D
Header row 2 cell R2-A cell R2-B cell R2-C cell R2-D
Header row 3 cell R3-A cell R3-B cell R3-C cell R3-D
Header row 4 cell R4-A cell R4-B cell R4-C cell R4-D

[edit] See also

Personal tools
Namespaces
Variants
Actions
Navigation
Interaction
Toolbox
Print/export
Morty Proxy This is a proxified and sanitized view of the page, visit original site.