Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Help:History of table pipe syntax development

From Wikipedia, the free encyclopedia

Wikicode table syntax, also known aspipe syntax, was developed byMagnus Manske as a substitute for HTML and employs thepipe character (i.e., vertical bar: | ) and other symbols for HTML elements like<tr> and<td>. There is anonline 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

[edit]

Atable is defined by{|parameters |}, which generates<tableparams>...</table>.

Rows

[edit]

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<trparams>.

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

[edit]

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:

<tdparams>cell1</td><tdparams>cell2</td><tdparams>cell3</td>

Headers

[edit]

The code used produces a<th>...</th>, functioning the same way as<td>...</td>, but with different style andsemantic 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

[edit]

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

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

Retrieved from "https://en.wikipedia.org/w/index.php?title=Help:History_of_table_pipe_syntax_development&oldid=1312784009"

[8]ページ先頭

©2009-2026 Movatter.jp