Template:Table/doc: Difference between revisions
Jump to navigation
Jump to search
m (→Elements) |
m (typo fix) |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Doc/subpage}} | {{Doc/subpage}} | ||
Adds a table, but actually adds a table. | Adds a table, but actually adds a table. | ||
== Parameters and Examples == | == Parameters and Examples == | ||
Line 13: | Line 10: | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1|{{param|1}}}} or {{Code|preset=1|{{param|text}}}} | | style="text-align:center" | {{Code|preset=1|{{param|1}}}} or {{Code|preset=1|{{param|text}}}} | ||
| | | Your text. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{Table|Hello, World!}}</nowiki>}} {{CodeBlock|<nowiki>{{Table|text = Hello, World!}}</nowiki>}} | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{Table|Hello, World!}}</nowiki>}} {{CodeBlock|<nowiki>{{Table|text = Hello, World!}}</nowiki>}} | ||
|- | |- | ||
Line 20: | Line 17: | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1| {{param|caption}} }} | | style="text-align:center" | {{Code|preset=1| {{param|caption}} }} | ||
| Table caption | | Table caption. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{Table|caption = Hello, World!}}</nowiki>}} | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{Table|caption = Hello, World!}}</nowiki>}} | ||
|- | |- | ||
Line 36: | Line 33: | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1| {{param|style}} }} | | style="text-align:center" | {{Code|preset=1| {{param|style}} }} | ||
| Custom CSS | | Custom CSS. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{Table|style = background-image:linear-gradient(0deg, white, black)}}</nowiki>}} | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{Table|style = background-image:linear-gradient(0deg, white, black)}}</nowiki>}} | ||
|- | |- | ||
| colspan="3" style="background-color:#858585; text-align:center" | | | colspan="3" style="background-color:#858585; text-align:center" | | ||
==== <span style="color:#000"> Style </span> ==== | ==== <span style="color:#000"> Style </span> ==== | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1| {{param|caption indent}} }} | | style="text-align:center" | {{Code|preset=1| {{param|caption indent}} }} | ||
| | | Indentation of the caption from all sides. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{Table|caption indent = 1em 2em 3em 4em}}</nowiki>}} | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{Table|caption indent = 1em 2em 3em 4em}}</nowiki>}} | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1| {{param|caption indent:top}} }} | | style="text-align:center" | {{Code|preset=1| {{param|caption indent:top}} }} | ||
| | | Indentation of the caption at the top | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{Table|caption indent:top = 1em}}</nowiki>}} | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{Table|caption indent:top = 1em}}</nowiki>}} | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1| {{param|caption indent:right}} }} | | style="text-align:center" | {{Code|preset=1| {{param|caption indent:right}} }} | ||
| | | Indentation of the caption on the right. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{Table|caption indent:right = 2em}}</nowiki>}} | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{Table|caption indent:right = 2em}}</nowiki>}} | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1| {{param|caption indent:bottom}} }} | | style="text-align:center" | {{Code|preset=1| {{param|caption indent:bottom}} }} | ||
| | | Indentation of the caption at the bottom. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{Table|caption indent:bottom = 3em}}</nowiki>}} | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{Table|caption indent:bottom = 3em}}</nowiki>}} | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1| {{param|caption indent:left}} }} | | style="text-align:center" | {{Code|preset=1| {{param|caption indent:left}} }} | ||
| | | Indentation of the caption on the left. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{Table|caption indent:left = 4em}}</nowiki>}} | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{Table|caption indent:left = 4em}}</nowiki>}} | ||
|- | |- | ||
Line 112: | Line 110: | ||
| id = example_table | | id = example_table | ||
| align = center | | align = center | ||
| caption = <span style="user-select:none"> [[File: | | caption = <span style="user-select:none"> [[File:Valve icon.png|link = Valve]] </span> | ||
| caption indent:bottom = 1em | | caption indent:bottom = 1em | ||
| {{tr | | {{tr |
Latest revision as of 15:27, 4 August 2025

This is a documentation subpage for Template:Table.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Adds a table, but actually adds a table.
Parameters and Examples
Parameter | Description | Example |
---|---|---|
{{{1}}} or {{{text}}} | Your text. | |
Elements | ||
{{{caption}}} | Table caption. | |
Attributes | ||
{{{id}}} | Element ID. Useful for linking to a specific part of the page. | |
{{{class}}} | Custom HTML class. | |
{{{style}}} | Custom CSS. | |
Style | ||
{{{caption indent}}} | Indentation of the caption from all sides. | |
{{{caption indent:top}}} | Indentation of the caption at the top | |
{{{caption indent:right}}} | Indentation of the caption on the right. | |
{{{caption indent:bottom}}} | Indentation of the caption at the bottom. | |
{{{caption indent:left}}} | Indentation of the caption on the left. | |
{{{width}}} | The width of the cell. | |
{{{bgcolor}}} | Background color. | |
{{{radius}}} | The radius of the cell border. | |
{{{align}}} | Table alignment. Available values:
|
|
{{{font-size}}} | Font size. |
Ready-made table code
Header 1 | Header 2 | Header 3 |
---|---|---|
Cell 1 | Cell 2 | Cell 3 |
Cell 4 | ||
Cell 6 | Cell 7 |