PmWiki /

Basic markup

Tables are created via use of the double pipe character: ||. Lines beginning with this markup denote the beginning of table rows. Appearance of this character within a line denotes table cells. A border has been added to this table for visual purposes; default border width is 0.

Example 1. Basic table

|| border=1
|| cell 1 || cell 2 || cell 3 ||
|| cell 1 || cell 2 || cell 3 ||
cell 1cell 2cell 3
cell 1cell 2cell 3

Header cells can be created by placing ! as the first character of a cell:

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

This markup does not extend to !!, !!!, etc

Alignment of cell contents

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

Example 2. Changing alignment of cell contents

|| border=1 width=100%
||!cell 1      ||! cell 2  ||!       cell 3||
||left-aligned || centered || right-aligned||
cell 1cell 2cell 3
left-alignedcenteredright-aligned

Example 3. Default alignment of cell contents

|| border=1 width=100%
||!cell default||!cell left ||
||default-aligned||left-aligned ||
cell defaultcell left
default-alignedleft-aligned

Notice that the header and detail cells have different defaults.

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

« | PmWiki.Documentation Index | »

Éditer page - Historique - Imprimable - Changements récents - Aide - RechercheWiki
Page last modified on 19 mars 2005 à 01h05