You are welcome to use tables as needed. The easiest way of formatting tables is using basic tables, such as the ones you can get with the Table wizard. The resulting tables have silver borders, are centred in the page, wrap around your contents (thus, expanding as necessary), and automatically resize your columns. You can insert text, images, videos, as well as format text as required. Basic tables provides surprising functionality for the amount of coding required to create them.
Clicking on the button Table wizard will insert the syntax for basic tables of your selected size. You can specify the number of rows, the number of columns, and whether you want the first row to contain headers or not. Once you insert the code from the wizard onto the editor, the only thing that remains is to substitute the words "header" and "cell-content" with your own content.
For example, choosing three columns, three rows, and selecting to have the first row as headers, the wizard will insert the following code onto the editor:
This code will create a 3x3 table with the first row as column headers.
header
header
header
cell-content
cell-content
cell-content
cell-content
cell-content
cell-content
In syntax form, you can create basic tables by typing the cell contents between two double vertical lines "|| ||" (these lines represent the left and right limits of each cell). Add more vertical lines in your line of text to create columns; add more vertical lines in next lines of text to create rows (beware not to create blank lines, or you will split the table in two).
For example:
|| cell-1 || cell-2 ||
This code will create a table with two columns and one row (i.e. two cells).
cell-1
cell-2
|| cell-1 || cell-2 || || cell-3 || cell-4 ||
This code will create a table with two columns and two rows (i.e. four cells).
cell-1
cell-2
cell-3
cell-4
Merge cells
You can merge cells horizontally by duplicating the initial double vertical lines "||" (without a space) in order to represent how many cells are merged. (You cannot merge cells vertically in basic tables.)
For example:
|| cell-1 || cell-2 || |||| cell-3 ||
This code will create a long cell in row two (equal to two smaller cells on an, originally, 2x2 table).
This code will create a long cell towards the right in row two (on an, originally, 3x2 table).
cell-1
cell-2
cell-3
cell-4
cell-5
Add headers
To add headers, use "~" right after the two "initial" vertical lines of the corresponding cells (without a space). Headers are formatted in bold on a gray field.
For example:
This code will use as headers the top cells of each column.
header-1
header-2
cell-3
cell-4
Headers
You can add headers to any cell. For example, you may want the first column of the table (or the first row) to act as headers. You create headers by using "~" right after the two "initial" vertical lines of the corresponding cells (without a space). Headers are formatted in bold on a gray field, and content gets centered within the cell.
For example:
This code will center the text in cells 3 and 4, as appropriate.
header-1
header-2
cell-3
cell-4
Right alignment is achieved by using ">" immediately after the two initial vertical lines of the corresponding cells (without space). (However, you cannot align headers.)
This code will align the text in cells 3 and 4 to the right, as appropriate.
header-1
header-2
cell-3
cell-4
Left alignment is the default setting. However, it can also be achieved by using "<" immediately after the two initial vertical lines of the corresponding cells (without space). (However, you cannot align headers.)
This code will align the text in cells 3 and 4 to the left, as appropriate.
header-1
header-2
cell-3
cell-4
Insert videos
You can insert videos in a basic table with easy. Simply, write the embedding code into the corresponding cell. However, you need to write the embedding code into a single line without line breaks (otherwise, if you separate the lines -by using "enter"- you break the table or it will not be formatted). The table will adjust row and column size automatically.
For example:
|| cell-content (e.g. for describing the video) ||= [[embedvideo]] <object width="480" height="295"><param name="movie" value="http://www.youtube.com/v/yuivXzKfyjk&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/yuivXzKfyjk&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="295"></embed></object> [[/embedvideo]] || || cell-content ||= [[size smaller]] (Video embedded from [http://www.youtube.com/ YouTube] on 16 August 2009) [[/size]] ||
This code embeds a video from YouTube within a 2x2 table. The second cell displays the video centred within the cell. The fourth cell is used for adding the reference, with the text also centred, and displayed using a smaller font, as per the Standard Rules.
You can insert images in a basic table with easy. Simply, write the embedding code into the corresponding cell.
For example:
|| cell-content (e.g. for describing the image) ||= [[image http://upload.wikimedia.org/wikipedia/commons/b/bd/HALDhruvIAF.jpg width="210px" height="175px"]] || || cell-content ||= [[size smaller]] The HAL Dhruv helicopter (image embedded from [*http://en.wikipedia.org/wiki/Aircraft Wikipedia] on 16 August 2009) [[/size]] ||
This code embeds an image from Wikipedia within a 2x2 table. The second cell displays the image centred within the cell, as well as resized for fit. The fourth cell is used for adding a title and reference, with the text centred, and displayed using a smaller font, as per the Standard Rules.
cell-content (e.g. for describing the image)
cell-content
The HAL Dhruv helicopter (image embedded from Wikipedia on 16 August 2009)