Tables
The idea behind lightweight markup languages such as Textile and Markdown is to keep the source text readable. This is the reason the |
(the vertical bar) marker was chosen for tables. Thus, you can create a table using this code:
| |Heading 1|Heading 2|Heading 3| |Row heading 1| ? | ? | ? | |Row heading 2| ? | ? | ? | |Row heading 3| ? | ? | ? |
It will be formatted as follows:
The code looks very natural, doesn't it? In practice, however, users usually omit spaces, so the source text looks less readable.
Many Textile syntax rules support options (we will speak about this feature in detail later), and the table rule is among them. Thus, the _
option can be used to format the cell as a header. So, suppose we change the code to this:
|_. |_.Heading 1|_.Heading 2|_.Heading 3| |_.Row heading 1| ? | ? | ? | |_.Row heading 2| ? | ? | ? | |_.Row heading 3| ? ...