Difference between revisions of "Warhammer 40k - Lexicanum:Tables help"
m |
|||
Line 163: | Line 163: | ||
| Row 1, Cell 1 | | Row 1, Cell 1 | ||
| Row 1, Cell 2 | | Row 1, Cell 2 | ||
+ | |+ | ||
+ | ! Row 2 Header | ||
+ | | Row 2, Cell 1 | ||
+ | | Row 2, Cell 2 | ||
+ | |} | ||
+ | |} | ||
+ | |||
+ | ===Cell Alignment=== | ||
+ | Cells can be aligned to be right-justified, centered, or left justified. By default, cells are left-justified.<br> | ||
+ | '''Right Justification'''<br> | ||
+ | To right-justify a cell, after the ''Pipe'' place the text '''align="right"''' followed by another ''Pipe''.<br> | ||
+ | '''Centered'''<br> | ||
+ | To center a cell, after the ''Pipe'' place the text '''align="center''' followed by another ''Pipe''.<br> | ||
+ | '''Left justification'''<br> | ||
+ | To left-justify a cell, after the ''Pipe'' place the text '''align="left"''' followed by another ''Pipe''. This is usually not necessary, as the default is to left-justify.<br> | ||
+ | |||
+ | Example: | ||
+ | {| style="background-color:#666666" | ||
+ | | | ||
+ | {| | ||
+ | |<nowiki>{| border="1"</nowiki><br> | ||
+ | <nowiki>|+ Table Caption</nowiki><br> | ||
+ | <nowiki>| </nowiki><br> | ||
+ | <nowiki>!</nowiki> Column 1 Header<br> | ||
+ | <nowiki>!</nowiki> Column 2 Header<br> | ||
+ | <nowiki>|-</nowiki><br> | ||
+ | <nowiki>!</nowiki> Row 1 Header<br> | ||
+ | '''<nowiki>| align="right" |</nowiki>''' Row 1, Cell 1<br> | ||
+ | '''<nowiki>| align="center" |</nowiki>''' Row 1, Cell 2<br> | ||
+ | <nowiki>|-</nowiki><br> | ||
+ | <nowiki>!</nowiki> Row 2 Header<br> | ||
+ | <nowiki>| Row 2, Cell 1</nowiki><br> | ||
+ | <nowiki>| Row 2, Cell 1</nowiki><br> | ||
+ | <nowiki>|}</nowiki> | ||
+ | |} | ||
+ | | produces: | ||
+ | | | ||
+ | {| border="1" style="background-color:#3f3f3f3" | ||
+ | |+ Table Caption | ||
+ | | | ||
+ | ! Column 1 Header | ||
+ | ! Column 2 Header | ||
+ | |+ | ||
+ | ! Row 1 Header | ||
+ | | align="right" |Row 1, Cell 1 | ||
+ | | align="center" |Row 1, Cell 2 | ||
|+ | |+ | ||
! Row 2 Header | ! Row 2 Header |
Revision as of 16:03, 25 February 2007
Further Help Files |
Contents
Introduction
This article is designed to be a How to guide for creating tables using wiki formating.
Table Elements
Creating a Table
- {| Curly Bracket followed by a Pipe is used to indicate the beginning of a table.
- | a Pipe, on a new line, is used to indicate the first cell of a table.
- |} a Pipe followed by a Curly Bracket is used to indicate the end of a table.
Example:
|
produces: |
|
Table Caption
To add a caption for a table, use a Pipe followed by a Plus |+ as the 1st line in the table.
Example:
|
produces: |
|
Add a Border
To add a border to a table, on the first line after the Curly Bracket and Pipe, type border="1". The higher the number the broader the border.
Example:
|
produces: |
|
Additional Horizontal Cells
To add additional horizontal cells, place a Pipe | on a new line.
Example (a table with 3 horizontal cells):
|
produces: |
|
Additional Rows
To add a row, on a new line, add a Pipe followed by a Hyphen |-. Then place a Pipe on the next line for the first cell in the new row.
Example:
|
produces: |
|
Row and Column Headers
To make a cell a row or column header, use an Exclamation Point ! instead of a Pipe.
Example:
|
produces: |
|
Cell Alignment
Cells can be aligned to be right-justified, centered, or left justified. By default, cells are left-justified.
Right Justification
To right-justify a cell, after the Pipe place the text align="right" followed by another Pipe.
Centered
To center a cell, after the Pipe place the text align="center followed by another Pipe.
Left justification
To left-justify a cell, after the Pipe place the text align="left" followed by another Pipe. This is usually not necessary, as the default is to left-justify.
Example:
|
produces: |
|
Terms
- Curly Bracket: { }
- Exclamation Point: !
- Hyphen: -
- Plus: +
- Pipe: |