Help:Tables

Tables are useful when presenting sorted data, various therapeutic approaches or just a lot of numbers. How can you make a table in WikiLectures?

Basics on tables
Here are basic pieces of code that help create a table. Every piece of code must be followed by a space!

Simple table can be written as:

{| class="wikitable" ! Code !! Preview


 * }

This simple table can be inserted when you click a “Table” button from the “Advanced” tab in the edit toolbar above the edit field. Of course you can change number of rows or columns as you need.

Atributes
You can change the style of the table or create a more complicated table when using atributes. Let’s have a look at them.

Atribute “class” (better look or sorting options)
This atribute is used at table start to change the style of the table. For example, simple table looks like this: {|
 * width="100" align="center" | →


 * }

If you want better looking table, you can add atribute class with value “wikitable”. This will do this table: {|
 * width="100" align="center" | →


 * }

If you want to sort the items in an alphabetical or numerical order, add atribute class with value “sortable”: {|
 * width="100" align="center" | →


 * }

Atribute “colspan” and “rowspan”
If you want to merge two columns, you have to use atribute colspan in the cell that you want to be merged with the value of number of cells merged. The next cells will be absent.

{|
 * width="100" align="center" | →


 * }

If you want to merge two or more rows, the code is similar. Use the atribute rowspan. But be careful: the next rows must have smaller number of cells!

{|
 * width="100" align="center" | →


 * }