Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 975

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 975

Deprecated: Function get_magic_quotes_gpc() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 399

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Array and string offset access syntax with curly braces is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/cookbook/toolbox.php on line 161

Warning: Use of undefined constant toolbox - assumed 'toolbox' (this will throw an Error in a future version of PHP) in /homepages/39/d252297167/htdocs/ccl/pmwiki/cookbook/toolbox.php on line 68

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Array and string offset access syntax with curly braces is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/scripts/skins.php on line 118

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 975

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Warning: Use of undefined constant FONTSIZER_VERSION - assumed 'FONTSIZER_VERSION' (this will throw an Error in a future version of PHP) in /homepages/39/d252297167/htdocs/ccl/pmwiki/pub/skins/triad/fontsizer.php on line 19

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Array and string offset access syntax with curly braces is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/scripts/pagelist.php on line 382

Deprecated: Array and string offset access syntax with curly braces is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/scripts/pagelist.php on line 432

Deprecated: Array and string offset access syntax with curly braces is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/scripts/pagelist.php on line 434

Deprecated: Function get_magic_quotes_gpc() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 399

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function get_magic_quotes_gpc() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 399

Deprecated: Array and string offset access syntax with curly braces is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/scripts/upload.php on line 327

Deprecated: Array and string offset access syntax with curly braces is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/scripts/upload.php on line 363

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Warning: Cannot modify header information - headers already sent by (output started at /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php:975) in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 1220
CCL - PmWiki - Tables

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Table basics

PmWiki has two types of table markup; the markup described in this page is useful for creating simple tables with lots of small cells, while table directive markups help with larger scale tables. For more possibilities with table formatting see Cookbook:Rowspan in simple tables and Cookbook:Formatting tables.

Tables are created via use of double pipe characters: ||. Lines beginning with this markup denote rows in a table or a formatting line. Within table row lines the double-pipe is used to delimit cells. In the examples below a border is added for illustration (the default is no border).

The first line in the markup contains formatting commands for the table. It only has double pipe characters at the start of the line.

Basic table
|| border=1
|| cell 1 || cell 2 || cell 3 ||
|| cell 1 || cell 2 ||
cell 1cell 2cell 3
cell 1cell 2

Header cells can be created by placing ! as the first character of a cell. Note that these are table headers, not headings, so it doesn't extend to !!, !!!, etc.

Table headers
|| border=1
||! cell 1 ||! cell 2 ||! cell 3 ||
|| cell 1  ||  cell 2 ||  cell 3 ||
cell 1cell 2cell 3
cell 1cell 2cell 3

A table can have a caption, indicated by ||!caption!||. Any caption must appear prior to other rows of the table.

Table caption
|| border=1
||! A special table !||
||! cell 1 ||! cell 2 ||! cell 3 ||
|| cell 1  ||  cell 2 ||  cell 3 ||
A special table
cell 1cell 2cell 3
cell 1cell 2cell 3

Formatting cell contents

Cell contents may be aligned left, centered, or aligned right.

  • To left-align contents, place the cell contents next to the leading ||.
  • To center contents, add a space before and after the cell contents.
  • To right-align contents, place a space before the cell contents and leave the cell contents next to the trailing ||.
Cell alignments
|| border=1 width=100%
||!cell 1      ||! cell 2  ||!       cell 3||
||left-aligned || centered || right-aligned||
cell 1cell 2cell 3
left-alignedcenteredright-aligned
Default cell alignments
|| border=1 width=100%
||!cell default||!cell left ||
||default-aligned||left-aligned ||
cell defaultcell left
default-alignedleft-aligned

Note that header and detail cells have different default alignments.

To get a cell to span multiple columns, follow the cell with empty cells. (At present there is no markup for spanning rows.)

Column spanning
|| border=1 width=100%
|| |||| right column ||
|| || middle column ||||
|| left column ||||||
|| left column || middle column || right column ||
 right column
 middle column
left column
left columnmiddle columnright column

Table attributes

Any line that begins with || but doesn't have a closing || sets the table attributes for any tables that follow. These attributes can control the size and position of the table, borders, background color, and cell spacing. (In fact these are just standard HTML attributes that are placed in the <table> tag.)

Use the width= attribute to set a table's width, using either a percentage value, an absolute size, or *.

Table width
|| border=1 width=100% 
|| cell 1 || cell 2 || cell 3 ||
|| c1 || cellcellcellcell2 || cell 3 ||
cell 1cell 2cell 3
c1cellcellcellcell2cell 3

The border= attribute sets the size of a table's borders.

Bordered table
|| border=10 width=70%
||!cell 1      ||! cell 2  ||!      
cell 3||
||left-aligned || centered ||
right-aligned||
cell 1cell 2cell 3
left-alignedcenteredright-aligned
Borderless table
|| border=0 width=70%
||!cell 1      ||! cell 2  ||!      
cell 3||
||left-aligned || centered ||
right-aligned||
cell 1cell 2cell 3
left-alignedcenteredright-aligned

Use align=center, align=left, and align=right to center, left, or right align a table. Note that align=left and align=right create a floating table, such that text wraps around the table.

Table alignment: center
|| border=1 align=center width=50%
||!cell 1      ||! cell 2  ||!       cell 3||
||left-aligned || centered || right-aligned||
Notice how text does not wrap with a table using "align=center".
cell 1cell 2cell 3
left-alignedcenteredright-aligned

Notice how text does not wrap with a table using "align=center".

Table alignment: left
|| border=1 align=left width=50%
||!cell 1      ||! cell 2  ||!       cell 3||
||left-aligned || centered || right-aligned||
Notice how text wraps to the right of a table using "align=left".
cell 1cell 2cell 3
left-alignedcenteredright-aligned

Notice how text wraps to the right of a table using "align=left".

Table alignment: right
|| border=1 align=right width=50%
||!cell 1      ||! cell 2  ||!       cell 3||
||left-aligned || centered || right-aligned||
Notice how text wraps to the left of a table using "align=right".
cell 1cell 2cell 3
left-alignedcenteredright-aligned

Notice how text wraps to the left of a table using "align=right".

Note: to get a table to align left (but not "float left") requires CSS, as in

||style="margin-left:0px;"

The bgcolor= attribute sets the background color for a table. At present there is no way to specify the color of individual rows or cells in this type of table (but see Cookbook:FormattingTables).

|| border=1 align=center bgcolor=yellow
width=70%
||!cell 1    ||! cell 2 ||!     cell 3||
||left-align || center  || right-align||
cell 1cell 2cell 3
left-aligncenterright-align

How do I create a basic table?

Tables are created via use of the double pipe character: ||. Lines beginning with this markup denote rows in a table; within such lines the double-pipe is used to delimit cells. In the examples below a border is added for illustration (the default is no border).

Basic table
|| border=1 rules=rows frame=hsides
|| cell 1 || cell 2 || cell 3 ||
|| cell 1 || cell 2 || cell 3 ||
cell 1cell 2cell 3
cell 1cell 2cell 3

How do I create cell headers?

Header cells can be created by placing ! as the first character of a cell. Note that these are table headers, not headings, so it doesn't extend to !!, !!!, etc.

Table headers
|| border=1 rules=cols frame=vsides
||! cell 1 ||! cell 2 ||! cell 3 ||
|| cell 1  ||  cell 2 ||  cell 3 ||
cell 1cell 2cell 3
cell 1cell 2cell 3

How do I obtain a table with thin lines and more distance to the content?

"Thin lines" is tricky and browser dependent, but the following works for Firefox and IE (Nov. 2009):

Thin lines and cell padding
||border="1"
style="border-collapse:collapse"
cellpadding="5" width=66%
||!Header ||! Header || '''Header'''||
||cells   ||  with   ||      padding||
||        ||         ||             ||
HeaderHeaderHeader
cellswithpadding
   

How do I create an advanced table?

See table directives

My tables are by default centered. When I try to use '||align=left' they don't align left as expected.

Use ||style="margin-left:0px;" instead.

How can I specify the width of columns?

You can define the widths via custom styles, see Cookbook:FormattingTables and $TableCellAttrFmt. Add in config.php : $TableCellAttrFmt = 'class=col$TableCellCount';

And add in pub/css/local.css :
table.column td.col1 { width: 120px; }
table.column td.col3 { width: 40px; }

How can I display a double pipe "||" in cell text using basic table markup?

Escape it with [=||=] to display || unchanged.

How to I apply styles to the elements of the table, like an ID to the table row, or a class/style to the TD?

See $WikiStyleApply.


This page may have a more recent version on pmwiki.org: PmWiki:Tables, and a talk page: PmWiki:Tables-Talk.


Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457

Deprecated: Function create_function() is deprecated in /homepages/39/d252297167/htdocs/ccl/pmwiki/pmwiki.php on line 457
Fun Stuff & Recent Changes

The Center for Christian Leadership exists to serve the evangelical church of Albania. Have you used our library? Have you attended a conference recently? Have you read a book we've published? Do you know a leader who could benefit from some training? Have you made use of the information on our web-page? (Oh, that's what you're doing now!) In all these ways and many others we are here to serve you!

Font Options