Difference between revisions of "Template:Prettytable"
Jump to navigation
Jump to search
(Created Prettytable template same as the one on meta.wikimedia.org) |
|||
Line 1: | Line 1: | ||
− | border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;" | + | <includeonly>border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;"</includeonly><noinclude>Use this template to make a [[Wikipedia:Help:Table|table]] looks cute. |
+ | |||
+ | === Example without <nowiki>{{Prettytable}}</nowiki> === | ||
+ | <pre> | ||
+ | {| | ||
+ | |+Header | ||
+ | !Title 1 | ||
+ | !Title 2 | ||
+ | |- | ||
+ | |Cell 1 || Cell 2 | ||
+ | |- | ||
+ | |colspan="2"| Row 2 | ||
+ | |} | ||
+ | </pre> | ||
+ | |||
+ | ''produces'' | ||
+ | |||
+ | {| | ||
+ | |+Header | ||
+ | !Title 1 | ||
+ | !Title 2 | ||
+ | |- | ||
+ | |Cell 1 || Cell 2 | ||
+ | |- | ||
+ | |colspan="2"| Row 2 | ||
+ | |} | ||
+ | |||
+ | === Example with <nowiki>{{Prettytable}}</nowiki> === | ||
+ | |||
+ | <pre> | ||
+ | {| {{Prettytable}} | ||
+ | |+Header | ||
+ | !Title 1 | ||
+ | !Title 2 | ||
+ | |- | ||
+ | |Cell 1 || Cell 2 | ||
+ | |- | ||
+ | |colspan="2"| Row 2 | ||
+ | |} | ||
+ | </pre> | ||
+ | |||
+ | ''produces'' | ||
+ | |||
+ | {| {{Prettytable}} | ||
+ | |+Header | ||
+ | !Title 1 | ||
+ | !Title 2 | ||
+ | |- | ||
+ | |Cell 1 || Cell 2 | ||
+ | |- | ||
+ | |colspan="2"| Row 2 | ||
+ | |} | ||
+ | |||
+ | </noinclude> |
Revision as of 09:16, 28 February 2009
Use this template to make a table looks cute.
Example without {{Prettytable}}
{| |+Header !Title 1 !Title 2 |- |Cell 1 || Cell 2 |- |colspan="2"| Row 2 |}
produces
Title 1 | Title 2 |
---|---|
Cell 1 | Cell 2 |
Row 2 |
Example with {{Prettytable}}
{| {{Prettytable}} |+Header !Title 1 !Title 2 |- |Cell 1 || Cell 2 |- |colspan="2"| Row 2 |}
produces
Title 1 | Title 2 |
---|---|
Cell 1 | Cell 2 |
Row 2 |