Difference between revisions of "Template:Table"
Jump to navigation
Jump to search
(Template for wiki table look and feel) |
(Added usage description) |
||
Line 1: | Line 1: | ||
border="1" cellpadding="4" cellspacing="0" style="border:#c9c9c9 1px solid; margin: 1em 1em 1em 0; border-collapse: collapse;" | border="1" cellpadding="4" cellspacing="0" style="border:#c9c9c9 1px solid; margin: 1em 1em 1em 0; border-collapse: collapse;" | ||
<noinclude> | |||
==Usage== | |||
This template is used in the first line of the wiki-markup for a table as an easy way to make the table look like standard Wikipedia tables. | |||
==Example== | |||
Without this template, this table: | |||
<pre>{| | |||
! Column 1 !! Column 2 | |||
|- | |||
| A || B | |||
|- | |||
| C || D | |||
|}</pre> | |||
displays as: | |||
{| | |||
! Column 1 !! Column 2 | |||
|- | |||
| A || B | |||
|- | |||
| C || D | |||
|} | |||
With the template, this table: | |||
<pre>{| <nowiki>{{table}}</nowiki> | |||
! Column 1 !! Column 2 | |||
|- | |||
| A || B | |||
|- | |||
| C || D | |||
|}</pre> | |||
displays as: | |||
{| {{table}} | |||
! Column 1 !! Column 2 | |||
|- | |||
| A || B | |||
|- | |||
| C || D | |||
|} | |||
</noinclude> |
Latest revision as of 22:56, 22 July 2009
border="1" cellpadding="4" cellspacing="0" style="border:#c9c9c9 1px solid; margin: 1em 1em 1em 0; border-collapse: collapse;"
Usage
This template is used in the first line of the wiki-markup for a table as an easy way to make the table look like standard Wikipedia tables.
Example
Without this template, this table:
{| ! Column 1 !! Column 2 |- | A || B |- | C || D |}
displays as:
Column 1 | Column 2 |
---|---|
A | B |
C | D |
With the template, this table:
{| {{table}} ! Column 1 !! Column 2 |- | A || B |- | C || D |}
displays as:
Column 1 | Column 2 |
---|---|
A | B |
C | D |