Skip to content

DokuWiki Tables and Advanced Formatting — Rows, Cells, Alignment and Colspan

DodaTech Updated 2026-06-28 8 min read

In this tutorial, you'll learn DokuWiki's table syntax, including cell alignment, column spans, row headers, and advanced formatting techniques like footnotes, abbreviations, and embedded content.

What You'll Learn

  • Basic table syntax with rows and columns
  • Cell alignment (left, center, right)
  • Column spans and row headers
  • Table formatting tricks
  • Footnotes and abbreviation syntax
  • Embedding content from other pages
  • No-wrap and cell width control

Why It Matters

Tables are essential for presenting structured data: configuration options, comparison matrices, parameter lists, pricing tables, and schedules. DokuWiki's table syntax is concise and readable in source form. Mastering table formatting means you can present complex data clearly without resorting to images or HTML.

Real-World Use

A system administrator documents server configurations. They create a table listing each server with columns for hostname, IP address, OS version, RAM, and disk space. They use center alignment for numeric columns, left alignment for text, and a header row with bold text. The table is easy to read in both source and rendered form, and updating it means editing a few rows of text.

Learning Path

flowchart LR
  A[Links and Images] --> B[Tables]
  B --> C[Media Management]
  C --> D[Sidebar]
  D --> E[Namespaces]
  E --> F[Namespace Management]

Basic Table Syntax

DokuWiki tables are created using pipe characters (|). Each row is enclosed in pipes, and cells are separated by pipes.

| Heading 1 | Heading 2 | Heading 3 |
| Cell 1    | Cell 2    | Cell 3    |
| Cell 4    | Cell 5    | Cell 6    |

The first row is automatically formatted as a table header. Each row must have the same number of cells.

Rendered:

Heading 1 Heading 2 Heading 3
Cell 1 Cell 2 Cell 3
Cell 4 Cell 5 Cell 6

Cell Alignment

Control alignment by adding spaces within the cell:

|         Left | Center         | Right         |
| Left         | Center         |          Right |
| :---         | :---:          |           ---: |
  • Left-aligned: Space at the end of the cell content
  • Center-aligned: Spaces at both beginning and end
  • Right-aligned: Space at the beginning of the cell content

The separator row (second row) uses colons to indicate alignment, similar to Markdown table syntax.

Left Center Right
Left-aligned Center-aligned Right-aligned
Text Text Text

Column Spans (Colspan)

To merge cells across columns, leave cells empty and use the ::: marker:

| Header 1 | Header 2 | Header 3 |
| :::      | Spanning two columns | Cell 3 |
| Cell 4   | Cell 5   | Cell 6   |

The ::: in the first column indicates that the cell from the previous column spans into this position. The content goes in the second column.

Rendered:

Header 1 Header 2 Header 3
Spanning two columns Cell 3
Cell 4 Cell 5 Cell 6

Row Headers

Use ^ instead of | to create row headers (cells formatted as headers vertically):

^ Row Header 1 ^ Row Header 2 ^
| Cell A1      | Cell B1      |
| Cell A2      | Cell B2      |

Tables with All Features

Here is a table combining headers, alignment, and row headers:

^       ^ Product A ^ Product B ^ Product C ^
| Price | $10       |    $15    |       $20 |
| Stock |    120    |     45    |       200 |
| Rating|   4.5/5   |    3/5    |     4/5   |

No-Wrap Cells

To prevent a cell's content from wrapping, add a space after the content and before the closing pipe, plus a space before the content:

| Long text that should wrap | No wrap text | Wrap normally |

There is no explicit no-wrap syntax in DokuWiki. To prevent wrapping, use CSS or keep the content short enough to fit.

Tables Without Headers

If you do not want the first row to be a header, start the table with a row separator:

| ^           ^             ^
| Plain row 1 | Cell 2      | Cell 3 |
| Plain row 2 | Cell 5      | Cell 6 |

The ^ in the first row marks all columns as non-header cells, and the table renders without header styling.

Footnotes

DokuWiki has built-in footnote support:

This text has a footnote((This is the footnote content.)).

The footnote appears as a superscript number at the footnote location, and the footnote text is displayed at the bottom of the page.

Multiple footnotes are automatically numbered:

First footnote((First one)). Second footnote((Second one)).

Abbreviations

Abbreviations let you define terms that show a tooltip on hover:

<abbr DokuWiki>DW</abbr> is a flat-file wiki engine.

When you hover over "DW," the tooltip shows "DokuWiki."

You can also define abbreviations globally in conf/abbreviations.conf:

DokuWiki = Flat-file wiki engine
PHP = PHP: Hypertext Preprocessor
ACL = Access Control List

Then use <abbr DokuWiki> in any page without redefining it.

Embedding Content

Including Other Pages

Use the ~~INCLUDE~~ syntax to embed the content of another page:

~~INCLUDE:namespace:page~~

This inserts the rendered content of the specified page into the current page.

Including a Section

~~INCLUDE:namespace:page#Section Heading~~

This includes only a specific section from another page.

Practical Examples

Configuration Reference Table

^ Parameter      ^ Default  ^ Description                    ^
| debug          |    0     | Enable debug mode              |
| log_level      |  warning | Minimum log level to record    |
| max_upload     |    64M   | Maximum file upload size       |
| session_timeout|   3600   | Session expiry in seconds      |

Comparison Table with Alignment

| Feature        | DokuWiki  | MediaWiki    | WordPress |
| :---           | :---:     | :---:        | :---:     |
| Database       | None      | MySQL        | MySQL     |
| Setup time     | 5 min     | 30 min       | 10 min    |
| Flat-file      | Yes       | No           | No        |
| ACL            | Per-page  | Group-based  | Role-basd|

Advanced Formatting Tips

  • Empty cells: Leave the cell content blank: ||| creates a row with three empty cells
  • Cell content with pipes: If your cell content contains a pipe character, DokuWiki may misinterpret it. Consider using monospace or a different representation
  • Long tables: DokuWiki handles tables of any length, but very long tables are hard to edit in the source view. Consider splitting them into multiple tables

Common Mistakes

  1. Mismatched cell counts: Each row must have the same number of cells. A row with 4 pipes when others have 5 pipes breaks the table layout.
  2. Forgetting the alignment pattern: The second row in DokuWiki tables is not a separator row like Markdown. Alignment is controlled by spaces within cells, not by colons in a separator row.
  3. Using HTML tables: DokuWiki disables HTML by default. Writing <table><tr><td> produces raw text, not a rendered table.
  4. Overly wide tables: Tables with many columns may overflow the page layout on mobile devices. Keep tables to 5-6 columns maximum, or use horizontal scrolling.
  5. Mixing row header and regular cell syntax: Using | in a row that should use ^ (or vice versa) creates inconsistent formatting. Decide whether a row is a header row or a data row and use the correct marker.

Practice Questions

  1. Write the DokuWiki syntax for a 3-column, 4-row table with a header row and left-aligned text in all cells.
  2. How do you create a cell that spans two columns in DokuWiki? Provide an example.
  3. What is the difference between | and ^ in DokuWiki tables, and when would you use each?
  4. Challenge: Create a complex table with at least 5 columns and 8 rows. Include: a header row, a row with a colspan of 2, a row header column, center-aligned numeric columns, left-aligned text columns, and right-aligned status columns. The table should be a server inventory with columns for hostname, IP, OS, RAM (GB), disk (GB), status, and notes.

FAQ

Can I create tables without a header row?

Yes. Start the table with a row using ^ markers in all cells: | ^ | ^ | ^ | followed by your data rows. This tells DokuWiki to treat all rows as regular rows without header formatting.

How do I add a pipe character inside a table cell?

If your content contains a pipe, use HTML entity encoding (&#124;) or wrap the pipe in monospace (''|''). DokuWiki will render the monospace pipe as expected.

Can I nest tables inside table cells?

DokuWiki does not support nested tables. For complex layouts, consider using multiple separate tables or a different presentation approach.

How do I create a table with a caption?

DokuWiki does not have a built-in table caption syntax. Add a caption as a separate line above the table using bold text or a heading, then create the table below it.

Why is my table not rendering correctly on mobile?

Wide tables can overflow on small screens. DokuWiki's default template includes responsive table handling with horizontal scrolling. If tables still overflow, reduce column count or abbreviate cell content.

Mini Project

Goal: Create a documentation page with multiple table types.

  1. Create a page called server-inventory in your wiki
  2. Add a table listing 5 servers with columns: Hostname, IP Address, OS, RAM, Disk, Status
  3. Add a comparison table of browsers with columns: Browser, Engine, Latest Version, Market Share
  4. Add a table with a colspan example showing a merged "Notes" row
  5. Use footnotes to explain technical terms
  6. Use abbreviations for recurring terms like "OS" and "RAM"
  7. Save and verify all tables render correctly

What's Next

Tables help you present structured data. Now learn media management to upload, organize, and manage images and files in DokuWiki.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro