# Editing Wikitext/Tables Ready to Use

Top Caption Goes Here. :
| | Tables Ready to Use The tables on this page are intended for those who need a Wikitext table that they can modify or extend for their use. For the main table-making page refer to Tables. The tables are accompanied by both Wikitext and HTML code modules in a drop-box, and this code can be copied into the WikiBooks Sandbox for additional work. The code in these modules has been numbered though the line numbers are local and will not appear in your pasted copies. Convert HTML Tables to Wiki is an excellent online tool, though a tool for the reverse process is elusive. Consequently, if both HTML and Wiki versions of tables are needed, it is advised to make tables first in HTML, then convert. Contributors with a useful table are encouraged to add to the page. |
| The Basic Table Top Caption Goes Here. Heading 1 Heading 2 Heading 3 A B C D E F G H I Wikitext and HTML code Wikitext Version: {| style="border:1px solid gray;border-collapse:collapse;background:white;" cellpadding=5px align=left width=70% |+ Top Caption Goes Here |- style="font-weight:bold; text-align:center;" ! width=33% style=" border:1px solid gray;"|Heading 1 ! width=33% style=" border:1px solid gray;"|Heading 2 ! width=33% style=" border:1px solid gray;"|Heading 3 |- | style="border:1px solid gray;"|A | style="border:1px solid gray;"|B | style="border:1px solid gray;"|C |- | style="border:1px solid gray;"|D | style="border:1px solid gray;"|E | style="border:1px solid gray;"|F |- | style="border:1px solid gray;"|G | style="border:1px solid gray;"|H | style="border:1px solid gray;"|I |} HTML Version: <table style="border:1px solid gray;border-collapse:collapse;background:white;" cellpadding=5px align=left width=70% > <caption> Top Caption Goes Here </caption> <tr style="font-weight:bold; text-align:center;"> <th width=33% style=" border:1px solid gray;">Heading 1</th> <th width=33% style=" border:1px solid gray;">Heading 2</th> <th width=33% style=" border:1px solid gray;">Heading 3</th> </tr> <tr> <td style="border:1px solid gray;">A</td> <td style="border:1px solid gray;">B</td> <td style="border:1px solid gray;">C</td> </tr> <tr> <td style="border:1px solid gray;">D</td> <td style="border:1px solid gray;">E</td> <td style="border:1px solid gray;">F</td> </tr> <tr> <td style="border:1px solid gray;">G</td> <td style="border:1px solid gray;">H</td> <td style="border:1px solid gray;">I</td> </tr> </table> || |
Row and Column Headings
Top Caption Goes Here
Description
Heading 1
Heading 2
Heading 3
Row Heading 1
A
B
C
Row Heading 2
D
E
F
Row Heading 3
G
H
I
Wikitext and HTML code
Wikitext Version:
{| style="border-collapse:collapse;background:white;" cellpadding=5px align=left width=70%
|+ Top Caption Goes Here
|- style="font-weight:bold; text-align:center;"
! width=25% style=" border:1px solid gray;"|Description
! width=25% style=" border:1px solid gray;"|Heading 1
! width=25% style=" border:1px solid gray;"|Heading 2
! width=25% style=" border:1px solid gray;"|Heading 3
| style="border:1px solid gray;"|'''Row Heading 1'''
| style="border:1px solid gray;"|A
| style="border:1px solid gray;"|B
| style="border:1px solid gray;"|C
| style="border:1px solid gray;"|'''Row Heading 2'''
| style="border:1px solid gray;"|D
| style="border:1px solid gray;"|E
| style="border:1px solid gray;"|F
| style="border:1px solid gray;"|'''Row Heading 3'''
| style="border:1px solid gray;"|G
| style="border:1px solid gray;"|H
| style="border:1px solid gray;"|I
HTML Version:
<table style="border-collapse:collapse;background:white;" cellpadding=5px align=left width=70% >
<caption> Top Caption Goes Here </caption>
<tr style="font-weight:bold; text-align:center;">
<th width=25% style=" border:1px solid gray;">Description</th>
<th width=25% style=" border:1px solid gray;">Heading 1</th>
<th width=25% style=" border:1px solid gray;">Heading 2</th>
<th width=25% style=" border:1px solid gray;">Heading 3</th>
</tr>
<tr>
<td style="border:1px solid gray;">'''Row Heading 1'''</td>
<td style="border:1px solid gray;">A</td>
<td style="border:1px solid gray;">B</td>
<td style="border:1px solid gray;">C</td>
</tr>
<tr>
<td style="border:1px solid gray;">'''Row Heading 2'''</td>
<td style="border:1px solid gray;">D</td>
<td style="border:1px solid gray;">E</td>
<td style="border:1px solid gray;">F</td>
</tr>
<tr>
<td style="border:1px solid gray;">'''Row Heading 3'''</td>
<td style="border:1px solid gray;">G</td>
<td style="border:1px solid gray;">H</td>
<td style="border:1px solid gray;">I</td>
</tr>
</table> :
Decimal Point Alignment
Caption Goes Here
$US
January
February
March
Totals
Item 1
1.
22
12.
20
122.
00
135.
42
Item 2
12.
20
122.
00
1220.
00
1354.
20
Item 3
122.
00
1220.
00
1.
22
1343.
22
Totals
135.
42
1354.
20
1343.
22
2832.
84
Wikitext and HTML Code
Wikitext Version:
{| style="border-top:2px solid green; border-bottom:2px solid green;text-align:left; background:white;" align="left" width="70%" border="0" cellspacing="0"
|+ Caption Goes Here
|- style="font-weight:bold; text-align:center;"
! style="border-bottom:1px solid green;padding:10px;" align=left | $US
! colspan=2 style="border-bottom:1px solid green;padding:10px;" | January
! colspan=2 style="border-bottom:1px solid green;padding:10px;" | February
! colspan=2 style="border-bottom:1px solid green;padding:10px;" | March
! colspan=2 style="border-bottom:1px solid green;padding:10px;" | Totals
| width=20% style="padding:10px;" | Item 1
| width=10% align=right style="padding:10px 0 10px 10px;" | 1.
| width=10% style="padding:10px 10px 10px 0;" | 22
| width=10% align=right style="padding:10px 0 10px 10px;" | 12.
| width=10% style="padding:10px 10px 10px 0;" | 20
| width=10% align=right style="padding:10px 0 10px 10px;" | 122.
| width=10% style="padding:10px 10px 10px 0;" | 00
| width=10% align=right style="padding:10px 0 10px 10px;" | 135.
| width=10% style="padding:10px 10px 10px 0;" | 42
| style="padding:10px;" | Item 2
| align=right style="padding:10px 0 10px 10px;" | 12.
| style="padding:10px 10px 10px 0;" | 20
| align=right style="padding:10px 0 10px 10px;" | 122.
| style="padding:10px 10px 10px 0;" | 00
| align=right style="padding:10px 0 10px 10px;" | 1220.
| style="padding:10px 10px 10px 0;" | 00
| align=right style="padding:10px 0 10px 10px;" | 1354.
| style="padding:10px 10px 10px 0;" | 20
| style="padding:10px;" | Item 3
| align=right style="padding:10px 0 10px 10px;" | 122.
| style="padding:10px 10px 10px 0;" | 00
| align=right style="padding:10px 0 10px 10px;" | 1220.
| style="padding:10px 10px 10px 0;" | 00
| align=right style="padding:10px 0 10px 10px;" | 1.
| style="padding:10px 10px 10px 0;" | 22
| align=right style="padding:10px 0 10px 10px;" | 1343.
| style="padding:10px 10px 10px 0;" | 22
! style="padding:10px;border-top:1px solid green;" align=left | Totals
| align=right style="border-top:1px solid green; padding:10px 0 10px 10px;" | 135.
| style="padding:10px 10px 10px 0;border-top:1px solid green;" | 42
| align=right style="padding:10px 0 10px 10px;border-top:1px solid green;" | 1354.
| style="padding:10px 10px 10px 0;border-top:1px solid green;" | 20
| align=right style="padding:10px 0 10px 10px;border-top:1px solid green;" | 1343.
| style="padding:10px 10px 10px 0;border-top:1px solid green;" | 22
| align=right style="padding:10px 0 10px 10px;border-top:1px solid green;" | 2832.
| style="padding:10px 10px 10px 0;border-top:1px solid green;" | 84
HTML Version:
<table style="border-top:2px solid green;border-bottom:2px solid green;text-align:left; background:white;" align="left" width="70%" border="0" cellspacing="0">
<caption> Caption Goes Here </caption>
<tr style="font-weight:bold; text-align:center;">
<th style="border-bottom:1px solid green;padding:10px;" align=left>$US</th>
<th colspan=2 style="border-bottom:1px solid green;padding:10px;">January</th>
<th colspan=2 style="border-bottom:1px solid green;padding:10px;">February</th>
<th colspan=2 style="border-bottom:1px solid green;padding:10px;">March</th>
<th colspan=2 style="border-bottom:1px solid green;padding:10px;">Totals</th>
</tr>
<tr>
<td width=20% style="padding:10px;">Item 1</td>
<td width=10% align=right style="padding:10px 0 10px 10px;">1.</td>
<td width=10% style="padding:10px 10px 10px 0;">22</td>
<td width=10% align=right style="padding:10px 0 10px 10px;">12.</td>
<td width=10% style="padding:10px 10px 10px 0;">20</td>
<td width=10% align=right style="padding:10px 0 10px 10px;">122.</td>
<td width=10% style="padding:10px 10px 10px 0;">00</td>
<td width=10% align=right style="padding:10px 0 10px 10px;">135.</td>
<td width=10% style="padding:10px 10px 10px 0;">42</td>
</tr>
<tr>
<td style="padding:10px;">Item 2</td>
<td align=right style="padding:10px 0 10px 10px;">12.</td>
<td style="padding:10px 10px 10px 0;">20</td>
<td align=right style="padding:10px 0 10px 10px;">122.</td>
<td style="padding:10px 10px 10px 0;">00</td>
<td align=right style="padding:10px 0 10px 10px;">1220.</td>
<td style="padding:10px 10px 10px 0;">00</td>
<td align=right style="padding:10px 0 10px 10px;">1354.</td>
<td style="padding:10px 10px 10px 0;">20</td>
</tr>
<tr>
<td style="padding:10px;">Item 3</td>
<td align=right style="padding:10px 0 10px 10px;">122.</td>
<td style="padding:10px 10px 10px 0;">00</td>
<td align=right style="padding:10px 0 10px 10px;">1220.</td>
<td style="padding:10px 10px 10px 0;">00</td>
<td align=right style="padding:10px 0 10px 10px;">1.</td>
<td style="padding:10px 10px 10px 0;">22</td>
<td align=right style="padding:10px 0 10px 10px;">1343.</td>
<td style="padding:10px 10px 10px 0;">22</td>
</tr>
<tr>
<th style="padding:10px;border-top:1px solid green;" align=left>Totals</th>
<td align=right style="border-top:1px solid green; padding:10px 0 10px 10px;">135.</td>
<td style="padding:10px 10px 10px 0;border-top:1px solid green;">42</td>
<td align=right style="padding:10px 0 10px 10px;border-top:1px solid green;">1354.</td>
<td style="padding:10px 10px 10px 0;border-top:1px solid green;">20</td>
<td align=right style="padding:10px 0 10px 10px;border-top:1px solid green;">1343.</td>
<td style="padding:10px 10px 10px 0;border-top:1px solid green;">22</td>
<td align=right style="padding:10px 0 10px 10px;border-top:1px solid green;">2832.</td>
<td style="padding:10px 10px 10px 0;border-top:1px solid green;">84</td>
</tr>
</table> :
Horizontal Color Bands
Top Caption Goes Here
Heading 1
Heading 2
Heading 3
A
B
C
D
E
F
G
H
I
Wikitext and HTML code
Wikitext Version:
{| style="border-collapse:collapse;background:ivory;" cellpadding=5px align=left width=70%
|+ Top Caption Goes Here
|- style="font-weight:bold; text-align:center;"
! width=33% style=" border:1px solid gray;"|Heading 1
! width=33% style=" border:1px solid gray;"|Heading 2
! width=33% style=" border:1px solid gray;"|Heading 3
|- style="background:lightgrey;"
| style="border:1px solid gray;"|A
| style="border:1px solid gray;"|B
| style="border:1px solid gray;"|C
| style="border:1px solid gray;"|D
| style="border:1px solid gray;"|E
| style="border:1px solid gray;"|F
|- style="background:lightgrey;"
| style="border:1px solid gray;"|G
| style="border:1px solid gray;"|H
| style="border:1px solid gray;"|I
HTML Version:
<table style="border-collapse:collapse;background:ivory;" cellpadding=5px align=left width=70% >
<caption> Top Caption Goes Here </caption>
<tr style="font-weight:bold; text-align:center;">
<th width=33% style=" border:1px solid gray;">Heading 1</th>
<th width=33% style=" border:1px solid gray;">Heading 2</th>
<th width=33% style=" border:1px solid gray;">Heading 3</th>
</tr>
<tr style="background:lightgrey;">
<td style="border:1px solid gray;">A</td>
<td style="border:1px solid gray;">B</td>
<td style="border:1px solid gray;">C</td>
</tr>
<tr>
<td style="border:1px solid gray;">D</td>
<td style="border:1px solid gray;">E</td>
<td style="border:1px solid gray;">F</td>
</tr>
<tr style="background:lightgrey;">
<td style="border:1px solid gray;">G</td>
<td style="border:1px solid gray;">H</td>
<td style="border:1px solid gray;">I</td>
</tr>
</table> :
Vertical Color Bands and 3D
Caption Goes Here
Cod
Halibut
Mackerel
Sardines
Total
North
32
34
43
45
154
East
23
22
11
13
69
South
111
21
4
5
141
West
54
45
34
43
176
Totals
220
122
92
106
540
Wikitext and HTML code
WikiText Version of 3D Table
{| style="border:1px solid rgb(220,220,220);background:rgb(230,230,230);text-align:center;border-collapse:collapse;" align="left" width="70%" border="0" cellpadding="10"
|+ Caption Goes Here
|- style="font-weight:bold; text-align:center;"
! width=16.5% style="background:silver;" |
! width=16.5% | Cod
! width=16.5% style="background:silver;" | Halibut
! width=16.5% | Mackerel
! width=16.5% style="background:silver;"| Sardines
! width=16.5% | Total
! align=left style="background:silver;" | North
| style="border-bottom:2px solid white;border-top:2px solid gray; border-left:2px solid gray;" | 32
| style=" background:silver;border-bottom:2px solid white;border-top:2px solid gray;" | 34
| style="border-bottom:2px solid white;border-top:2px solid gray;" | 43
| style="background:silver;border-bottom:2px solid white;border-top:2px solid gray;" | 45
! style="border-bottom:2px solid white;border-top:2px solid gray;" | 154
! align=left style="background:silver;" | East
| 23
| style="background:silver;" | 22
| 11
| style="background:silver;" | 13
! 69
! align=left style="background:silver;" | South
| style="border-bottom:2px solid white;border-top:2px solid gray; border-left:2px solid gray;" | 111
| style="border-bottom:2px solid white;border-top:2px solid gray; background:silver;" | 21
| style="border-bottom:2px solid white;border-top:2px solid gray;" | 4
| style="background:silver;border-bottom:2px solid white;border-top:2px solid gray;" | 5
! style="border-bottom:2px solid white;border-top:2px solid gray;" | 141
! align=left style="background:silver;" | West
| 54
| style="background:silver;" | 45
| 34
| style="background:silver;" | 43
! 176
! align=left style="background:silver;" | Totals
! style="border-bottom:2px solid white;border-top:2px solid gray; border-left:2px solid gray;" | 220
! style="border-bottom:2px solid white;border-top:2px solid gray; background:silver;" | 122
! style="border-bottom:2px solid white;border-top:2px solid gray;" | 92
! style="background:silver;border-bottom:2px solid white;border-top:2px solid gray;" | 106
! style="border-bottom:2px solid white;border-top:2px solid gray;" | 540
HTML Version:
<table style="border:1px solid rgb(220,220,220);background:rgb(230,230,230);text-align:center;border-collapse:collapse;" align="left" width="70%" border="0" cellpadding="10">
<caption>Caption Goes Here</caption>
<tr style="font-weight:bold; text-align:center;">
<th width=16.5% style="background:silver;"></th>
<th width=16.5%>Cod</th>
<th width=16.5% style="background:silver;">Halibut</th>
<th width=16.5%>Mackerel</th>
<th width=16.5% style="background:silver;">Sardines</th>
<th width=16.5% >Total</th>
</tr>
<tr>
<th align=left style="background:silver;">North</th>
<td style="border-bottom:2px solid white;border-top:2px solid gray; border-left:2px solid gray;">32</td>
<td style=" background:silver;border-bottom:2px solid white;border-top:2px solid gray;">34</td>
<td style="border-bottom:2px solid white;border-top:2px solid gray;">43</td>
<td style="background:silver;border-bottom:2px solid white;border-top:2px solid gray;">45</td>
<th style="border-bottom:2px solid white;border-top:2px solid gray;">154</th>
</tr>
<tr>
<th align=left style="background:silver;">East</th>
<td>23</td>
<td style="background:silver;">22</td>
<td>11</td>
<td style="background:silver;">13</td>
<th>69</th>
</tr>
<tr>
<th align=left style="background:silver;">South</th>
<td style="border-bottom:2px solid white;border-top:2px solid gray; border-left:2px solid gray;">111</td>
<td style="border-bottom:2px solid white;border-top:2px solid gray; background:silver;">21</td>
<td style="border-bottom:2px solid white;border-top:2px solid gray;">4</td>
<td style="background:silver;border-bottom:2px solid white;border-top:2px solid gray;">5</td>
<th style="border-bottom:2px solid white;border-top:2px solid gray;">141</th>
</tr>
<tr>
<th align=left style="background:silver;">West</th>
<td>54</td>
<td style="background:silver;">45</td>
<td>34</td>
<td style="background:silver;">43</td>
<th>176</th>
</tr>
<tr>
<th align=left style="background:silver;">Totals</th>
<th style="border-bottom:2px solid white;border-top:2px solid gray; border-left:2px solid gray;">220</th>
<th style="border-bottom:2px solid white;border-top:2px solid gray; background:silver;">122</th>
<th style="border-bottom:2px solid white;border-top:2px solid gray;">92</th>
<th style="background:silver;border-bottom:2px solid white;border-top:2px solid gray;">106</th>
<th style="border-bottom:2px solid white;border-top:2px solid gray;">540</th>
</tr>
</table> :
Spaced Layout
Top Caption Goes Here
January
February
March
April
May
June
Total
North
4
32
3
8
12
6
65
East
1
0
10
3
4
3
21
West
6
7
9
11
16
2
51
South
4
22
23
19
8
5
81
Total
15
61
45
41
40
16
218
Wikitext and HTML code
Wikitext Version:
{| style="text-align:center;border-collapse:separate;border-spacing:5px;background:white;" cellpadding=5px align=left width=70%
|+ Top Caption Goes Here
|- style="font-weight:bold; text-align:center; background:whitesmoke;"
! width=12.5% |
! width=12.5% |January
! width=12.5% |February
! width=12.5% |March
! width=12.5% |April
! width=12.5% |May
! width=12.5% |June
! width=12.5% |Total
|- style="background:lightgrey;"
| align=left|North
| 4
| 32
| 3
| 8
| 12
| 6
| '''65'''
|- style="background:whitesmoke;"
| align=left|East
| 1
| 0
| 10
| 3
| 4
| 3
| '''21'''
|- style="background:lightgrey;"
| align=left|West
| 6
| 7
| 9
| 11
| 16
| 2
| '''51'''
|- style="background:whitesmoke;"
| align=left|South
| 4
| 22
| 23
| 19
| 8
| 5
| '''81'''
|-style="background:lightgrey;"
| align=left|'''Total'''
| '''15'''
| '''61'''
| '''45'''
| '''41'''
| '''40'''
| '''16'''
| '''218'''
HTML Version:
<table style="text-align:center;border-collapse:separate;border-spacing:5px;background:white;" cellpadding=5px align=left width=70% >
<caption> Top Caption Goes Here </caption>
<tr style="font-weight:bold; text-align:center; background:whitesmoke;">
<th width=12.5% ></th>
<th width=12.5% >January</th>
<th width=12.5% >February</th>
<th width=12.5% >March</th>
<th width=12.5% >April</th>
<th width=12.5% >May</th>
<th width=12.5% >June</th>
<th width=12.5% >Total</th>
</tr>
<tr style="background:lightgrey;">
<td align=left>North</td>
<td> 4</td>
<td> 32</td>
<td> 3</td>
<td> 8</td>
<td> 12</td>
<td> 6</td>
<td> '''65'''</td>
</tr>
<tr style="background:whitesmoke;">
<td align=left>East</td>
<td> 1</td>
<td> 0</td>
<td> 10</td>
<td> 3</td>
<td> 4</td>
<td> 3</td>
<td> '''21'''</td>
</tr>
<tr style="background:lightgrey;">
<td align=left>West</td>
<td> 6</td>
<td> 7</td>
<td> 9</td>
<td> 11</td>
<td> 16</td>
<td> 2</td>
<td> '''51'''</td>
</tr>
<tr style="background:whitesmoke;">
<td align=left>South</td>
<td> 4</td>
<td> 22</td>
<td> 23</td>
<td> 19</td>
<td> 8</td>
<td> 5</td>
<td> '''81'''</td>
</tr>
<tr style="background:lightgrey;">
<td align=left>'''Total'''</td>
<td> '''15'''</td>
<td> '''61'''</td>
<td> '''45'''</td>
<td> '''41'''</td>
<td> '''40'''</td>
<td> '''16'''</td>
<td> '''218'''</td>
</tr>
</table> :
A Colorful Table
Top Caption Goes Here
Heading 1
Heading 2
Heading 3
A
B
C
D
E
F
G
H
I
Wikitext and HTML code
Wikitext Version:
{| style="background:lightyellow;border:1px solid gray;" cellspacing=0 cellpadding=5px align=left width=70%
|+ Top Caption Goes Here
|- style="font-weight:bold; text-align:center; background:brown; color:white;"
! style=" border-bottom:1.5px solid black"|Heading 1
! style=" border-bottom:1.5px solid black"|Heading 2
! style=" border-bottom:1.5px solid black"|Heading 3
| width=33% style="border-bottom:1px solid gray"|A
| width=33% style="border-bottom:1px solid gray"|B
| width=33% style="border-bottom:1px solid gray"|C
| style="border-bottom:1px solid gray"|D
| style="border-bottom:1px solid gray"|E
| style="border-bottom:1px solid gray"|F
| style="border-bottom:1.5px solid black"|G
| style="border-bottom:1.5px solid black"|H
| style="border-bottom:1.5px solid black"|I
HTML Version:
<table style="background:lightyellow;border:1px solid gray;" cellspacing=0 cellpadding=5px align=left width=70% >
<caption> Top Caption Goes Here </caption>
<tr style="font-weight:bold; text-align:center; background:brown; color: white;">
<th style=" border-bottom:1.5px solid black">Heading 1</th>
<th style=" border-bottom:1.5px solid black">Heading 2</th>
<th style=" border-bottom:1.5px solid black">Heading 3</th>
</tr>
<tr>
<td width=33% style="border-bottom:1px solid gray">A</td>
<td width=33% style="border-bottom:1px solid gray">B</td>
<td width=33% style="border-bottom:1px solid gray">C</td>
</tr>
<tr>
<td style="border-bottom:1px solid gray">D</td>
<td style="border-bottom:1px solid gray">E</td>
<td style="border-bottom:1px solid gray">F</td>
</tr>
<tr>
<td style="border-bottom:1.5px solid black">G</td>
<td style="border-bottom:1.5px solid black">H</td>
<td style="border-bottom:1.5px solid black">I</td>
</tr>
</table> :