PDA

View Full Version : How do you make tables on the Wiki?


DannyK
12-01-2005, 11:07 AM
I'm interested in adding a table to my "Nevermore" Wiki page. This is trivially easy to do with something like Excel, but is there a handy way to do it with Wiki code?

I'm looking for something like:

Player A | Player B | Player C
PC A | PC B | PC C
Stat A | Stat B | Stat C.. and so on.

Any easy way to do this, besides typing it all in and using the Preview button a whole bunch of times?

Knockwood
12-01-2005, 11:15 PM
Well, a quick visit to the MediaWiki Help gives us the following:

{| (that's brace-pipe; starts the table.)
| Cell #1 (each cell starts with a pipe)
| Cell #2
|- (pipe-dash; separates rows)
| Cell #3 || Cell #4 (double pipe to separate cells on the same line)
|} (pipe-brace ends the table)


Needless to say, don't type in the italic parts.

As is, it gives you a table without boxes or other fancy stuff; to put boxes around the cells, put border=1 after the first brace-pipe. Also, you can put a little space between cells with cellspacing=3 on that line.

Therefore, your little table can be coded as:
{| border=1 cellspacing=3
| Player A || Player B || Player C
|-
| PC A || PC B || PC C
|-
| Stat A || Stat B || Stat C
|}

That's a basic table. For more, there's MediaWiki's Editing Help Page (http://meta.wikimedia.org/wiki/Help%3AEditing), or specifically the Help Page for Tables (http://meta.wikimedia.org/wiki/Help:Table).

Good luck... --Kwd

PS: I've said it before... the Preview button is your friend. Use it. :D

DannyK
12-05-2005, 07:26 AM
Awesome. Thanks a million!