[[File:Handbook31.png|border|]]
===Text Alignment===
Text alignment in cells can be left, right, or center-aligned, as well as vertically aligned to the top, middle, or bottom.
====Horizontal Alignment====
To align to the left, right or center, use
====Vertical Alignment====
Vertical alignment can be set to top, middle, or bottom with, at cell or row level.
'''Height:''' Used with a percentage will indicate what percentage of the table it will take up. On the table start level, a percentage cannot be used with the height - use 'px' for pixels instead.
'''====Example 1: Defining a table's width and height'''====
{| border="1" style="width:75%; height:300px;"
</pre>
'''====Example 2: Defining a row's height'''====
{| border="1" style="width:75%; height:300px;"
|-style="height:75%;"
</pre>
<hr>
====Row and Column Spans====
You can span cells across multiple rows or columns, which is the same as merging cells together in word processing programs.
Colour codes can be placed at different levels depending on what you are trying to achieve. In the table I have created above, the whole table is coloured a teal colour, while some other cells are coloured differently. This gives the illusion of a coloured border when a border size is not specified.
===Table Bordersand Spacing=======Table Borders====
By default, tables are made with no borders, as you saw in Tables: Basic Construction.
</pre>
These define top, right, bottom, and left borders respectively. {| border="1" style="border-width:10px 40px 80px 0px;"
|-
|Row 1||Row 1||Row 1
|Row 2||Row 2||Row 2
|}
These define top, right, bottom, and left borders respectively.
If you wish to have the top and bottom have the same border width, as well as the left and right sides to have the same, it is defined by top/bottom and left/right respectively.
style="border-width:10px 40px;"
</pre>
{| border="1" style="border-width:10px 40px;"|-|Row 1||Row 1||Row 1|-|Row 2||Row 2||Row 2|} ====Table Spacing====
You can add some space in your cells by adding cell padding. To do so, add the following code to the table start level:
<pre>
This will create a 10-pixel margin of space in every direction in your cell.
===Table Classes (Styles)===
There are some table classes that provide some table formatting for you. They are most commonly used, as it makes it easier to understand and set up.
To add a class to your table, simply add:
====Wikitable====
The wikitable class gives a light grey background to cells, and simple table borders.
====Wikitable Sortable====
The wikitable sortable class gives the same things as the wikitable class does, but also makes your columns sortable (alphabetically).
|}
====Sortable====
The sortable class adds the ability to sort columns alphabetically.