Template:Td/doc: Difference between revisions
Jump to navigation
Jump to search
Thunder4ik (talk | contribs) m (→See also: clean up, replaced: See Also → See also) |
|||
Line 11: | Line 11: | ||
| 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. | | Your text. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{ | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{td|Hello, World!}}</nowiki>}} {{CodeBlock|<nowiki>{{td|text = Hello, World!}}</nowiki>}} | ||
|- | |- | ||
| colspan="3" style="background-color:#858585; text-align:center" | | | colspan="3" style="background-color:#858585; text-align:center" | | ||
Line 18: | Line 18: | ||
| style="text-align:center" | {{Code|preset=1| {{param|id}} }} | | style="text-align:center" | {{Code|preset=1| {{param|id}} }} | ||
| Element ID. Useful for linking to a specific part of the page. | | Element ID. Useful for linking to a specific part of the page. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{ | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{td|id = my_id}}</nowiki>}} {{CodeBlock|<nowiki>[[My Sweet Page#my_id|My sweet page]]</nowiki>}} | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1| {{param|class}} }} | | style="text-align:center" | {{Code|preset=1| {{param|class}} }} | ||
| Custom HTML class. | | Custom HTML class. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{ | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{td|class = myClass}}</nowiki>}} | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1| {{param|colspan}} }} | | style="text-align:center" | {{Code|preset=1| {{param|colspan}} }} | ||
| Specifies values for the HTML attribute {{Code|colspan}}. | | Specifies values for the HTML attribute {{Code|colspan}}. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{ | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{td|colspan = 2}}</nowiki>}} | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1| {{param|rowspan}} }} | | style="text-align:center" | {{Code|preset=1| {{param|rowspan}} }} | ||
| Specifies values for the {{Code|rowspan}} HTML attribute. | | Specifies values for the {{Code|rowspan}} HTML attribute. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{ | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{td|rowspan = 4}}</nowiki>}} | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1| {{param|style}} }} | | style="text-align:center" | {{Code|preset=1| {{param|style}} }} | ||
| Custom CSS (prepared styles are also planned). | | Custom CSS (prepared styles are also planned). | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{ | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{td|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" | | ||
Line 42: | Line 42: | ||
| style="text-align:center" | {{Code|preset=1| {{param|width}} }} | | style="text-align:center" | {{Code|preset=1| {{param|width}} }} | ||
| The width of the cell. | | The width of the cell. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{ | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{td|width = 30%}}</nowiki>}} | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1| {{param|bgcolor}} }} | | style="text-align:center" | {{Code|preset=1| {{param|bgcolor}} }} | ||
| Background color. | | Background color. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{ | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{td|bgcolor = rgb(255 255 255)}}</nowiki>}} | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1| {{param|dark}} }} | | style="text-align:center" | {{Code|preset=1| {{param|dark}} }} | ||
| Dark version of the background color. | | Dark version of the background color. | ||
{{Warning|Overwrites {{Code|preset=1|{{param|bgcolor}}}} and does not allow you to specify a custom background color.}} | {{Warning|Overwrites {{Code|preset=1|{{param|bgcolor}}}} and does not allow you to specify a custom background color.}} | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{ | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{td|dark = true}}</nowiki>}} | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1| {{param|radius}} }} | | style="text-align:center" | {{Code|preset=1| {{param|radius}} }} | ||
| The radius of the cell border. | | The radius of the cell border. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{ | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{td|radius = 8px 2px 4px 8px}}</nowiki>}} | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1| {{param|select}} }} | | style="text-align:center" | {{Code|preset=1| {{param|select}} }} | ||
| Specifies the value for the CSS property {{Code|<nowiki>user-select</nowiki>}}. | | Specifies the value for the CSS property {{Code|<nowiki>user-select</nowiki>}}. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{ | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{td|select = all}}</nowiki>}} | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1| {{param|align}} }} | | style="text-align:center" | {{Code|preset=1| {{param|align}} }} | ||
| Text alignment. | | Text alignment. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{ | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{td|align = right}}</nowiki>}} | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1| {{param|font-size}} }} | | style="text-align:center" | {{Code|preset=1| {{param|font-size}} }} | ||
| Font size. | | Font size. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{ | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{td|font-size = 1.5em}}</nowiki>}} | ||
|- | |- | ||
| style="text-align:center" | {{Code|preset=1| {{param|color}} }} | | style="text-align:center" | {{Code|preset=1| {{param|color}} }} | ||
| Text color. | | Text color. | ||
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{ | | style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{td|color = #893GVS}}</nowiki>}} | ||
|} | |} | ||
Latest revision as of 23:03, 5 September 2025

This is a documentation subpage for Template:Td.
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.
A data cell of an HTML table with a prepared style.
Parameters and Examples
Parameter | Description | Example |
---|---|---|
{{{1}}} or {{{text}}} | Your text. | |
Attributes | ||
{{{id}}} | Element ID. Useful for linking to a specific part of the page. | |
{{{class}}} | Custom HTML class. | |
{{{colspan}}} | Specifies values for the HTML attribute colspan. | |
{{{rowspan}}} | Specifies values for the rowspan HTML attribute. | |
{{{style}}} | Custom CSS (prepared styles are also planned). | |
Style | ||
{{{width}}} | The width of the cell. | |
{{{bgcolor}}} | Background color. | |
{{{dark}}} | Dark version of the background color.
![]() |
|
{{{radius}}} | The radius of the cell border. | |
{{{select}}} | Specifies the value for the CSS property user-select. | |
{{{align}}} | Text alignment. | |
{{{font-size}}} | Font size. | |
{{{color}}} | Text color. |
See also