Wikipedia:How to make a table in wikipedia
From Wikipedia, the free encyclopedia
Below is a list of example tables and the code required to produce these tables in Wikipedia. Scroll down this page to find a table that you prefer, and then copy-paste the code into the article you are working on. You can then customise the text within the tables. You can add extra columns or rows to the tables by following the pattern of the code.
Contents |
[edit] Template I
Heading for column 1 | Heading for column 2 | Heading for column 3 |
---|---|---|
text for row 1, column 1 | text for row 1, column 2 | text for row 1, column 3 |
text for row 2, column 1 | text for row 2, column 2 | text for row 2, column 3 |
[edit] Copy-paste this code to produce the above table
{|border="1" cellpadding="5"
|-
!Heading for column 1
!Heading for column 2
!Heading for column 3
|-
|text for row 1, column 1
|text for row 1, column 2
|text for row 1, column 3
|-
|text for row 2, column 1
|text for row 2, column 2
|text for row 2, column 3
|}
[edit] Template II
Heading for column 1 | Heading for column 2 | Heading for column 3 |
---|---|---|
text for row 1, column 1 | text for row 1, column 2 | text for row 1, column 3 |
text for row 2, column 1 | text for row 2, column 2 | text for row 2, column 3 |
[edit] Copy-paste this code to produce the above table
{|border="1" cellpadding="5" cellspacing="0" align="center"
|-
!Heading for column 1
!Heading for column 2
!Heading for column 3
|-
|text for row 1, column 1
|text for row 1, column 2
|text for row 1, column 3
|-
|text for row 2, column 1
|text for row 2, column 2
|text for row 2, column 3
|}
[edit] Template III
Heading for column 1 | Heading for column 2 | Heading for column 3 |
---|---|---|
text for row 1, column 1 | text for row 1, column 2 | text for row 1, column 3 |
text for row 2, column 1 | text for row 2, column 2 | text for row 2, column 3 |
[edit] Copy-paste this code to produce the above table
{|border="1" cellpadding="5" cellspacing="0" align="center"
|-
! style="background:#efefef;" | Heading for column 1
! style="background:#efefef;" | Heading for column 2
! style="background:#efefef;" | Heading for column 3
|-
|text for row 1, column 1
|text for row 1, column 2
|text for row 1, column 3
|-
|text for row 2, column 1
|text for row 2, column 2
|text for row 2, column 3
|}
[edit] Template IV
Heading for column 1 | Heading for column 2 | Heading for column 3 | |
---|---|---|---|
Heading for row 1 | text for row 1, column 1 | text for row 1, column 2 | text for row 1, column 3 |
Heading for row 2 | text for row 2, column 1 | text for row 2, column 2 | text for row 2, column 3 |
[edit] Copy-paste this code to produce the above table
{|border="1" cellpadding="5" cellspacing="0" align="center"
|-
|
! style="background:#efefef;" | Heading for column 1
! style="background:#efefef;" | Heading for column 2
! style="background:#efefef;" | Heading for column 3
|-
! style="background:#efefef;" | Heading for row 1
|text for row 1, column 1
|text for row 1, column 2
|text for row 1, column 3
|-
! style="background:#efefef;" | Heading for row 2
|text for row 2, column 1
|text for row 2, column 2
|text for row 2, column 3
|}