|  = Soma = | Wiki  |
|
Table basicsPmWiki has two types of table markup; the markup described in this page is useful for creating tables with lots of small cells, while table directive markups help with larger scale tables. Simple tables are created via use of the double pipe character: (:markup caption='Basic table':) || border=1 || cell 1 || cell 2 || cell 3 || || cell 1 || cell 2 || cell 3 || 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. (:markup caption='Table headers':) || border=1 ||! cell 1 ||! cell 2 ||! cell 3 || || cell 1 || cell 2 || cell 3 || A table can have a caption, indicated by (:markup caption='Table caption':) || border=1 ||! A special table !|| ||! cell 1 ||! cell 2 ||! cell 3 || || cell 1 || cell 2 || cell 3 || Formatting cell contentsCell contents may be aligned left, centered, or aligned right.
(:markup caption='Cell alignments':) || border=1 width=100% ||!cell 1 ||! cell 2 ||! cell 3|| ||left-aligned || centered || right-aligned|| (:markup caption='Default cell alignments':) || border=1 width=100% ||!cell default||!cell left || ||default-aligned||left-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.) (:markup caption='Column spanning':) || border=1 width=100% || |||| right column || || || middle column |||| || left column |||||| || left column || middle column || right column || Table attributesAny line that begins with
Other examples(:markup caption='A more complex table':) %define=sp padding-right:1em font-weight:bold% || border=1 || [++Events Calendar++] |||||||||| || '''May 2005''' || '''June 2005''' || '''July 2005''' || '''August 2005''' || '''September 2005''' || ||%sp%'''10'''%%6:30 - 8:30 Big Meeting\\\ %sp%'''17'''%%7:00 - 8:30 Bigger Meeting\\\ %sp%'''24'''%%7:00 - 8:30 Biggest Meeting|| || || || || || '''October 2005''' || '''November 2005''' || '''December 2005''' || '''January 2006''' || '''February 2006''' || || || || || || || << Uploads | Documentation Index | Table directives >> |