Template:Th/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 67: Line 67:
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{th|color = #893GVS}}</nowiki>}}
| style="padding:.2em .5em" | {{CodeBlock|<nowiki>{{th|color = #893GVS}}</nowiki>}}
|}
|}
== See Also ==
* {{tl|link=Table}}
* {{tl|link=tr}}
* {{tl|link=td}}


{{Doc/Sandbox other|
{{Doc/Sandbox other|
[[Category:Templates]]
[[Category:Templates]]
}}
}}

Revision as of 06:37, 12 June 2023

Edit-copy.png
This is a documentation subpage for Template:Th.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

HTML table header with prepared style. You can also use <th></th> if desired.

Parameters and Examples

Parameter Description Example
{{{1}}} or {{{text}}} Your text.
{{th|Hello, World!}}
{{th|text = Hello, World!}}

Attributes

{{{id}}} Element ID.
{{th|id = my_id}}
{{{class}}} Custom HTML class.
{{th|class = myClass}}
{{{colspan}}} Specifies values for the HTML attribute colspan.
{{th|colspan = 2}}
{{{rowspan}}} Specifies values for the rowspan HTML attribute.
{{th|rowspan = 4}}
{{{style}}} Custom CSS (prepared styles are also planned).
{{th|style = background-image:linear-gradient(0deg, white, black)}}

Style

{{{width}}} The width of the cell.
{{th|width = 30%}}
{{{bgcolor}}} Background color.
{{th|bgcolor = rgb(255 255 255)}}
{{{radius}}} The radius of the cell border.
{{th|radius = 8px 2px 4px 8px}}
{{{select}}} Specifies the value for the CSS property user-select.
{{th|select = all}}
{{{align}}} Text alignment.
{{th|align = right}}
{{{font-size}}} Font size.
{{th|font-size = 1.5em}}
{{{color}}} Text color.
{{th|color = #893GVS}}

See Also