Table Markup

To create a table, start & end a new line using the table marker; two 'pipe' characters "||". Between those start and end markers, you can create any number of cells by separating them with "||". In the most basic example, here is a four-square table:

|| top left cell || top right cell ||
|| bottom left cell || bottom right cell ||

Yields:

top left cell

top right cell

bottom left cell

bottom right cell

Table Attributes

Of course, undoubtedly the time will come when you want a bit formatting. Moin tables can be formatted with many HTML table attributes. Any attributes have to be placed between angle brackets <...> directly after the cell marker. For example: ||<style"..."> cell content ||

The style stuff is all you need for styling your tables. Just use CSS-formatted styles and it will be inlined in the generated HTML tag.

<style="..."> will put that style info into cell (td) html

<rowstyle="..."> will put that style info into row (tr) html

<tablestyle="..."> will put that style info into table (table) html

We still support the old table markup, but generate the effect by appending additional values to the style parameter:

Cell & table widths:

<50%>: cell width (will append width: 50%; to style)

<width="50%">: does the same

<tablewidth="100%">: set table width to 100% (only valid in first table row)

<rowbgcolor="#XXXXXX"> set row background color (only valid in first cell)

<tablebgcolor="#XXXXXX"> set table background color

If you use several conflicting options like <(:)>, the last option wins. There is no explicit option for vertical centering (middle), since that is always the default.

Leveraging CSS in your tables

Alternatively, the admin or the user (the admin in the theme css file, or the user can extend moin's CSS by his own definitions via user preferences) can refer to them using class or id. You can use several options at the same time by writing them one after the other within the same angle brackets (e.g. <tablestyle="..." rowstyle="..."> on the first cell, to set both the table-wide style and the first-row style.