More actions
→Wiki syntax: Using tables |
|||
| Line 80: | Line 80: | ||
<--Look-left--- | <--Look-left--- | ||
====Tables==== | |||
{{hatnote|For full details of tables, see [https://www.mediawiki.org/wiki/Help:Tables Mediawiki's article]}} | |||
Basic tables are simple to create, requiring just a few pieces of markup: | |||
*<pre><nowiki>{|</nowiki></pre> starts a table | |||
*<pre><nowiki>|-</nowiki></pre> starts a new row | |||
*<pre><nowiki>|</nowiki></pre> starts a new cell (each cell must have its own line) | |||
*<pre><nowiki>|}</nowiki></pre> ends the table | |||
Example: | |||
<pre><nowiki> | |||
{| | |||
|cell 1 | |||
|cell2 | |||
|cell3 | |||
|- | |||
|2nd row | |||
|another cell | |||
|and another | |||
|- | |||
|last row | |||
|2 cells | |||
|and the third | |||
|} | |||
</nowiki></pre> | |||
Produces: | |||
{| | |||
|cell 1 | |||
|cell2 | |||
|cell3 | |||
|- | |||
|2nd row | |||
|another cell | |||
|and another | |||
|- | |||
|last row | |||
|2 cells | |||
| and the third | |||
|} | |||
It can be desirable to add gridlines to your table, this can be done by starting the table with the following: | |||
<pre><nowiki>{| class="wikitable"</nowiki></pre> | |||
=== Proper categorization === | === Proper categorization === | ||