Jump to content


From Wikimedia Incubator

For the text color template, see Template:Wp/bcc/Black.

The templates in this series are designed to be used in a table to make a cell with text in that cell, with an appropriately colored background. They are commonly used in comparison tables.

For example, {{yes}} makes a cell with a green background. The text in the cell is taken from the first parameter; {{yes|Sure}} would output "Sure" otherwise it defaults to "Yes". Most templates allow authors to override the default text in this way, some require text put after the template call and some also need a vertical bar in between: {{table cell template}} text or {{table cell template}} | text. This information, the colors and default texts are found in the table below.

If you want to use other attributes for the table cells, e.g. colspan or rowspan, they need to be put before the template call and there must be no vertical bar | in between them:

Template:Yes Template:Wp/bcc/No rowspan=2 Template:Wp/bcc/N/a
colspan=2 Template:Wp/bcc/Yes-No
!{{Yes}} ||{{Wp/bcc/No}} ||rowspan=2 {{Wp/bcc/N/a}}
|colspan=2 {{Wp/bcc/Yes-No}}


[edit source]
Table cell templates
Class[1] Default syntax Preview (default) Customized syntax Preview (customized)
table-rh {{rh}} | Row header[2] Template:Wp/bcc/Rh | Row header Template:Wp/bcc/Tlp | Row header Template:Wp/bcc/Rh | Row header
{{rh2}} | Row header[2] Template:Wp/bcc/Rh2 | Row header Template:Wp/bcc/Tlp | Row header Template:Wp/bcc/Rh2 | Row header
table-yes {{yes}} Template:Wp/bcc/Yes Template:Wp/bcc/Tlp Template:Wp/bcc/Yes
{{ya}} Template:Wp/bcc/Ya Template:Wp/bcc/Tlp Template:Wp/bcc/Ya
table-no {{no}} Template:Wp/bcc/No Template:Wp/bcc/Tlp Template:Wp/bcc/No
{{na}} Template:Wp/bcc/Na Template:Wp/bcc/Tlp Template:Wp/bcc/Na
{{coming soon}} Template:Wp/bcc/Coming soon
{{bad}} Template:Wp/bcc/Bad Template:Wp/bcc/Tlp Template:Wp/bcc/Bad
{{eliminated}} Template:Wp/bcc/Eliminated
table-siteactive {{site active}} Template:Wp/bcc/Site active
table-siteinactive {{site inactive}} Template:Wp/bcc/Site inactive
table-yes2 {{good}} Template:Wp/bcc/Good Template:Wp/bcc/Tlp Template:Wp/bcc/Good
{{yes2}} Template:Wp/bcc/Yes2 Template:Wp/bcc/Tlp Template:Wp/bcc/Yes2
{{won}} Template:Wp/bcc/Won {{Wp/bcc/Won|text=white|color=darkblue}} Template:Wp/bcc/Won
{{Wp/bcc/Won|place=1}} Template:Wp/bcc/Won {{Wp/bcc/Won|place=Gold}} Template:Wp/bcc/Won
{{Wp/bcc/Won|place=2}} Template:Wp/bcc/Won {{Wp/bcc/Won|place=Silver}} Template:Wp/bcc/Won
{{Wp/bcc/Won|place=3}} Template:Wp/bcc/Won {{Wp/bcc/Won|place=Bronze}} Template:Wp/bcc/Won
table-no2 {{no2}} Template:Wp/bcc/No2 Template:Wp/bcc/Tlp Template:Wp/bcc/No2
{{nom}} Template:Wp/bcc/Nom Template:Wp/bcc/Tlp Template:Wp/bcc/Nom
{{sho}} Template:Wp/bcc/Sho
{{TBA}} Template:Wp/bcc/TBA Template:Wp/bcc/Tlp Template:Wp/bcc/TBA
table-partial {{partial}} Template:Wp/bcc/Partial
{{yes-No}} Template:Wp/bcc/Yes-No
{{okay}} Template:Wp/bcc/Okay Template:Wp/bcc/Tlp Template:Wp/bcc/Okay
{{some}} Template:Wp/bcc/Some
table-any {{any}} Template:Wp/bcc/Any
table-na {{n/a}} Template:Wp/bcc/N/a
{{BLACK}} Template:Wp/bcc/BLACK
table-unknown {{dunno}} Template:Wp/bcc/Dunno
{{unknown}} Template:Wp/bcc/Unknown
table-depends {{depends}} Template:Wp/bcc/Depends Template:Wp/bcc/Tlp Template:Wp/bcc/Depends
table-included {{included}} Template:Wp/bcc/Included
table-dropped {{dropped}} Template:Wp/bcc/Dropped
Template:Wp/bcc/Wp/bcc/Tl Template:Wp/bcc/Terminated
table-beta {{beta}} Template:Wp/bcc/Beta
{{table-experimental}} Template:Wp/bcc/Table-experimental Template:Wp/bcc/Tlp Template:Wp/bcc/Table-experimental
table-maybe {{maybe}} Template:Wp/bcc/Maybe Template:Wp/bcc/Tlp Template:Wp/bcc/Maybe
table-free {{free}} Template:Wp/bcc/Free Template:Wp/bcc/Tlp Template:Wp/bcc/Free
table-proprietary {{proprietary}} Template:Wp/bcc/Proprietary Template:Wp/bcc/Tlp Template:Wp/bcc/Proprietary
table-nonfree {{nonfree}} Template:Wp/bcc/Nonfree Template:Wp/bcc/Tlp Template:Wp/bcc/Nonfree
table-needs {{needs}} Template:Wp/bcc/Needs Template:Wp/bcc/Tlp Template:Wp/bcc/Needs
table-nightly {{nightly}} Template:Wp/bcc/Nightly Template:Wp/bcc/Tlp Template:Wp/bcc/Nightly
table-release-candidate {{release-candidate}} Template:Wp/bcc/Release-candidate Template:Wp/bcc/Tlp Template:Wp/bcc/Release-candidate
no class {{?}}[3] Template:?
no class {{draw}} Template:Wp/bcc/Draw Template:Wp/bcc/Tlp Template:Wp/bcc/Draw
no class {{incorrect}} Template:Wp/bcc/Incorrect Template:Wp/bcc/Tlp Template:Wp/bcc/Incorrect
no class {{no result}} Template:Wp/bcc/No result Template:Wp/bcc/Tlp Template:Wp/bcc/No result
no class {{pending}} Template:Wp/bcc/Pending
no class {{unofficial}} Template:Wp/bcc/Unofficial
no class {{usually}} Template:Wp/bcc/Usually
no class {{rarely}} Template:Wp/bcc/Rarely
no class {{sometimes}} Template:Wp/bcc/Sometimes

Common code to most if not all the templates in this series:

Template:Wp/bcc/Table cell templates

Code specific to this template:

style="background: #ececec; color: grey; vertical-align: middle; text-align: center; " class="table-na" | N/A

To make a new table cell template you can use:

{{subst:Table cell templates|text= default text |bg= background color |class= a class name without prefix |align= standard horizontal alignment}}

You should leave out the align parameter and often the class parameter is unnecessary, too.

Add the new template to the table in the common documentation afterwards. Please consider reusing one of the other templates and please choose the color sensibly.

If you find a table cell template that does not take a parameter and you want to be able to change the text in the cell, do not duplicate the template! Instead, edit the template and change the text to a default parameter substitution. For example, if a template's text is Dropped, change that to {{{1|Dropped}}}.

style="background: #abcdef; color: black; vertical-align: middle; text-align: center; " class="automatic table-automatic"| text

One of several templates for styling individual table cells with standard contents and colors.

Template parameters


text to be displayed instead of the default, if this doesn’t work put the text after the template, possibly with a vertical bar | in between

(template dependent)
horizontal alignalign

text alignment inside the cell, either ‘left’, ‘right’, ‘center’ or ‘justified’


a semicolon separated list of additional CSS rules to be applied to the table cell

background colorcolor

a valid CSS color value or name to override the standard the cell background, only available with some templates

(template dependent)

See also

[edit source]


  1. The HTML class of table cell templates may be referenced in a user stylesheet to change appearance.
  2. 2.0 2.1 Does not take a parameter; the content should be placed after the template call, separated by a pipe (|) character.
  3. Does not take a parameter; not really a table cell template at all, but here for completeness