Help:History of table pipe syntax development

Wikicode table syntax, also known as pipe syntax, was developed by Magnus Manske as a substitute for HTML and employs the pipe character (i.e., vertical bar:  | ) and other symbols for HTML elements like <tr> and <td>. There is an online script, which converts an HTML table to a wikicode table.

The pipe character must start at the beginning of a new line, except when separating parameters from content or when using doubled pipes (||) to separate cells on a single code line. The parameters are optional.

Tables

A table is defined by {| parameters |}, which generates <table params>...</table>.

Rows

For each table, an HTML <tr> tag is generated for the first row. To start a new row, use:

|-

which generates another <tr>.

Parameters can be added like this:

|- params

which generates <tr params>.

Note:

  • <tr> tags are automatically opened before the first <td> equivalent
  • <tr> tags are automatically closed at another <tr> equivalent and at the </table> equivalent

Cells

Cells are generated either like this:

|cell1
|cell2
|cell3

or like this:

|cell1||cell2||cell3

which both generate:

<td>cell1</td><td>cell2</td><td>cell3</td>.

The || equals a newline +  | .

Parameters in cells can be used like this:

|params|cell1||params|cell2||params|cell3

which results in:

<td params>cell1</td>
<td params>cell2</td>
<td params>cell3</td>

Headers

The code used produces a <th>...</th>, functioning the same way as <td>...</td>, but with different style and semantic meaning. A  !  character is used instead of the opening  | , and !! can be used like ||, to enter multiple headers on the same line. Parameters still use "|", though. Example:

!params|cell1

Captions

A <caption> tag is created by |+caption which generates the HTML <caption>caption</caption>.

You can also use parameters: |+params|caption which generates <caption params>caption</caption>.

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.