Help:Table: Difference between revisions
From Fanon Wiki
PinkYoshiFan (talk | contribs) (Created page with "{{Help}} '''Tables''' can be used to organize a variety of data. ==Table markup== Tables are always started using <code><nowiki>{|</nowiki></code> and ended with <code>|}</code>. A column of a table is made using <code>!insert text here</code>. A standard cell of a table is made with <code>|</code>. For columns and rows, each new one will move to the right one cell in the current row. A row break is made with <code>|-</code>. Each of these should have a line break betwee...") |
PinkYoshiFan (talk | contribs) m (→Table markup) |
||
Line 2: | Line 2: | ||
'''Tables''' can be used to organize a variety of data. | '''Tables''' can be used to organize a variety of data. | ||
==Table markup== | ==Table markup== | ||
Tables are always started using <code><nowiki>{|</nowiki></code> and ended with <code>|}</code>. A column of a table is made using <code>!insert text here</code>. A standard cell of a table is made with <code>|</code>. For | Tables are always started using <code><nowiki>{|</nowiki></code> and ended with <code>|}</code>. A column header of a table is made using <code>!insert text here</code>. A standard cell of a table is made with <code>|</code>. For cells, each new one will move to the right one cell in the current row. A row break is made with <code>|-</code>. Each of these should have a line break between them in the editor. For example: | ||
<pre> | <pre> | ||
{| | {| | ||
Line 26: | Line 26: | ||
|cell two, row two | |cell two, row two | ||
|} | |} | ||
==Table modifiers== | ==Table modifiers== | ||
Tables can be modified using classes. Each of these should be inside a table after the initial <code><nowiki>{|</nowiki></code> by typing <code>class="class-1 class-2 etc"</code> | Tables can be modified using classes. Each of these should be inside a table after the initial <code><nowiki>{|</nowiki></code> by typing <code>class="class-1 class-2 etc"</code> |
Revision as of 20:42, 11 May 2022
|
Tables can be used to organize a variety of data.
Table markup
Tables are always started using {|
and ended with |}
. A column header of a table is made using !insert text here
. A standard cell of a table is made with |
. For cells, each new one will move to the right one cell in the current row. A row break is made with |-
. Each of these should have a line break between them in the editor. For example:
{| !column one !column two |- |cell one, row one |cell two, row one |- |cell one, row two |cell two, row two |}
makes
column one | column two |
---|---|
cell one, row one | cell two, row one |
cell one, row two | cell two, row two |
Table modifiers
Tables can be modified using classes. Each of these should be inside a table after the initial {|
by typing class="class-1 class-2 etc"
- wikitable (Makes the table have the standard background and borders. Should be used on most tables.)
- mw-collapsible (Makes the table collapsible. Useful on large tables. Put
& nbsp;
(without the space) at the end of the last column to avoid overlap with the[collapse]
button.) - mw-collapsed (Makes the table collapsed. Should only be used alongside
mw-collapsible
. Can be used with one cell and withoutwikitable
to make hidden content. - sortable (Makes the table sortable by column alphabetically. Use
!class="unsortable"|column name
to make a specific column unsortable.)
By adding all of these modifiers to the table from before, this is produced:
column one | column two |
---|---|
cell one, row one | cell two, row one |
cell one, row two | cell two, row two |