Inyandikorugero:Table cell templates/doc

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. Most of these templates should not be used simply to produce a background color, use them according to their meaning.

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.

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

Yes No N/A
colspan=2 style="border:solid 3px Maroon" Inyandikorugero:Yes-No
...
!{{Yes}} ||{{No}} ||rowspan=2 {{n/a}}
|-
|colspan=2 style="border:solid 3px Maroon" {{Yes-No}}
...

Templates

hindura
Table cell templates
Class[1] Default Customized
Syntax Preview Syntax Preview
table-rh {{rh}} | Row header[2] Inyandikorugero:Rh | Row header {{rh|align=right}} | Row header Inyandikorugero:Rh | Row header
{{rh2}} | Row header[2] Inyandikorugero:Rh2 | Row header {{rh2|align=center}} | Row header Inyandikorugero:Rh2 | Row header
table-yes {{yes}} Yes {{yes|customized [[plain text|text]]}} customized text
{{yes C}} Inyandikorugero:Yes C {{yes C|customized [[plain text|text]]}} Inyandikorugero:Yes C
{{yes O}} Inyandikorugero:Yes O {{yes O|customized [[plain text|text]]}} Inyandikorugero:Yes O
{{yes N}} Inyandikorugero:Yes N {{yes N|customized [[plain text|text]]}} Inyandikorugero:Yes N
table-maybe {{maybe}} Maybe {{maybe|customized [[plain text|text]]}} customized text
table-no {{no}} No {{no|customized [[plain text|text]]}} customized text
{{no O}} Inyandikorugero:No O {{no O|customized [[plain text|text]]}} Inyandikorugero:No O
{{no X}} Inyandikorugero:No X {{no X|customized [[plain text|text]]}} Inyandikorugero:No X
{{eliminated}} Inyandikorugero:Eliminated {{eliminated|dropped out}} Inyandikorugero:Eliminated
{{lost}} Inyandikorugero:Lost {{lost|missing}} Inyandikorugero:Lost
{{active fire|12%}}[3] Inyandikorugero:Active fire
{{safe}} Inyandikorugero:Safe {{safe|protected}} Inyandikorugero:Safe
{{no Y}} Inyandikorugero:No Y {{no Y|customized [[plain text|text]]}} Inyandikorugero:No Y
table-active {{active}} Inyandikorugero:Active {{active|live}} Inyandikorugero:Active
table-siteactive {{site active}} Inyandikorugero:Site active {{site active|up}} Inyandikorugero:Site active
{{coming soon}} Inyandikorugero:Coming soon {{coming soon|second half of the year}} Inyandikorugero:Coming soon
table-siteinactive {{site inactive}} Inyandikorugero:Site inactive {{site inactive|down}} Inyandikorugero:Site inactive
table-success {{success}} Inyandikorugero:Success {{success|mission complete}} Inyandikorugero:Success
{{operational}} Inyandikorugero:Operational {{operational|returning data}} Inyandikorugero:Operational
table-failure {{failure}} Inyandikorugero:Failure {{failure|wrong orbit}} Inyandikorugero:Failure
table-yes2 {{yes2}} Inyandikorugero:Yes2 {{yes2|text}} Inyandikorugero:Yes2
{{good}} Inyandikorugero:Good {{good|A}} Inyandikorugero:Good
{{ya}} Inyandikorugero:Ya {{ya|text=ya}} Inyandikorugero:Ya
{{ya|Ya}} Inyandikorugero:Ya {{ya|text|link=WP:ALT}} Inyandikorugero:Ya
{{yan}} Inyandikorugero:Yan {{yan|text=ya}} Inyandikorugero:Yan
{{won}} Inyandikorugero:Won {{won|text=white|color=darkblue|winner}} Inyandikorugero:Won
{{won|place=1}} Inyandikorugero:Won {{won|place=gold}} Inyandikorugero:Won
{{won|place=2}} Inyandikorugero:Won {{won|place=silver}} Inyandikorugero:Won
{{won|place=3}} Inyandikorugero:Won {{won|place=bronze}} Inyandikorugero:Won
{{WinDL}} Inyandikorugero:WinDL {{WinDL|win}} Inyandikorugero:WinDL
{{WinDL|res=D}} Inyandikorugero:WinDL {{WinDL|res=draw}} Inyandikorugero:WinDL
{{WinDL|res=L}} Inyandikorugero:WinDL {{WinDL|res=loss}} Inyandikorugero:WinDL
table-no2 {{no2}} Inyandikorugero:No2 {{no2|text}} Inyandikorugero:No2
{{na}} Inyandikorugero:Na {{na|text=na}} Inyandikorugero:Na
{{na|Na}} Inyandikorugero:Na {{na|text|link=WP:ALT}} Inyandikorugero:Na
{{nan}} Inyandikorugero:Nan {{nan|text=na}} Inyandikorugero:Nan
{{nom}} Inyandikorugero:Nom {{nom|5}} Inyandikorugero:Nom
{{notnom}} Inyandikorugero:Notnom {{notnom}} Inyandikorugero:Notnom
{{sho}} Inyandikorugero:Sho {{sho|proposed}} Inyandikorugero:Sho
{{longlisted}} Inyandikorugero:Longlisted {{longlisted|rejected}} Inyandikorugero:Longlisted
{{TBA}} Inyandikorugero:TBA {{TBA|to be announced}} Inyandikorugero:TBA
table-partial {{partial}} Partial {{partial|almost done}} almost done
{{Regional}} Inyandikorugero:Regional {{Regional|Uyghur}} Inyandikorugero:Regional
{{MaybeCheck}} Inyandikorugero:MaybeCheck {{MaybeCheck|text=possibly}} Inyandikorugero:MaybeCheck
{{MaybeCheck|possibly}} Inyandikorugero:MaybeCheck {{MaybeCheck|text|link=WP:ALT}} Inyandikorugero:MaybeCheck
{{partial success}} Inyandikorugero:Partial success {{partial success|
reached orbit and returned pictures}}
Inyandikorugero:Partial success
{{partial failure}} Inyandikorugero:Partial failure {{partial failure|[[Cubesat]] not deployed}} Inyandikorugero:Partial failure
{{okay}} Inyandikorugero:Okay {{okay|C}} Inyandikorugero:Okay
{{Yes-No}} Inyandikorugero:Yes-No {{Yes-No|yes with an if; no with a but}} Inyandikorugero:Yes-No
{{some}} Inyandikorugero:Some {{some|many}} Inyandikorugero:Some
{{pending}} Inyandikorugero:Pending {{pending|awaiting}} Inyandikorugero:Pending
{{sometimes}} Inyandikorugero:Sometimes {{sometimes|occasionally}} Inyandikorugero:Sometimes
{{rarely}} Inyandikorugero:Rarely {{rarely|seldom}} Inyandikorugero:Rarely
{{usually}} Inyandikorugero:Usually {{usually|commonly}} Inyandikorugero:Usually
{{unofficial}} Inyandikorugero:Unofficial {{unofficial|''de facto''}} Inyandikorugero:Unofficial
{{unofficial2}} Inyandikorugero:Unofficial2 {{unofficial2|''de facto''}} Inyandikorugero:Unofficial2
{{nonpartisan}} Inyandikorugero:Nonpartisan {{nonpartisan|impartial}} Inyandikorugero:Nonpartisan
table-any {{any}} Inyandikorugero:Any {{any|anyone}} Inyandikorugero:Any
table-automatic {{perhaps}} Inyandikorugero:Perhaps {{perhaps|maybe}} Inyandikorugero:Perhaps
table-draw {{draw}} Inyandikorugero:Draw {{draw|1:1}} Inyandikorugero:Draw
table-noAttempt {{No attempt}} Inyandikorugero:No attempt {{No attempt|No landing attempted}} Inyandikorugero:No attempt
table-na {{n/a}} N/A {{n/a|unavailable}} unavailable
{{varies}} Inyandikorugero:Varies {{varies|differs}} Inyandikorugero:Varies
{{non-album single}}[4] Inyandikorugero:Non-album single {{non-album single|EP}} Inyandikorugero:Non-album single
{{unreleased}} Inyandikorugero:Unreleased {{unreleased|shelved}} Inyandikorugero:Unreleased
{{BLACK}} Inyandikorugero:BLACK {{BLACK|banned}} Inyandikorugero:BLACK
{{sdash}} Inyandikorugero:Sdash {{sdash|[[File:Dash.svg|13px|dash icon]]}} Inyandikorugero:Sdash
{{vacant}} Inyandikorugero:Vacant {{vacant|missing}} Inyandikorugero:Vacant
table-unknown {{unknown}} Inyandikorugero:Unknown {{unknown|?}} Inyandikorugero:Unknown
{{dunno}} Inyandikorugero:Dunno {{dunno|not sure}} Inyandikorugero:Dunno
table-included {{included}} Inyandikorugero:Included {{included|incorporated}} Inyandikorugero:Included
noresult {{no result}} Inyandikorugero:No result {{no result|NR}} Inyandikorugero:No result
table-planned {{planned}} Inyandikorugero:Planned {{planned|July 2028}} Inyandikorugero:Planned
table-scheduled {{scheduled}} Inyandikorugero:Scheduled {{scheduled|3 March 2027}} Inyandikorugero:Scheduled
table-software[5] {{beta}} Inyandikorugero:Beta {{beta|preview}} Inyandikorugero:Beta
{{table-experimental}} Inyandikorugero:Table-experimental {{table-experimental|lab}} Inyandikorugero:Table-experimental
{{nightly}} Inyandikorugero:Nightly {{nightly|dev}} Inyandikorugero:Nightly
{{release-candidate}} Inyandikorugero:Release-candidate {{release-candidate|RC}} Inyandikorugero:Release-candidate
{{open source}} Inyandikorugero:Open source {{open source|software libre}} Inyandikorugero:Open source
{{free}} Inyandikorugero:Free {{free|empty}} Inyandikorugero:Free
{{proprietary}} Inyandikorugero:Proprietary {{proprietary|custom extension}} Inyandikorugero:Proprietary
{{nonfree}} Inyandikorugero:Nonfree {{nonfree|paid}} Inyandikorugero:Nonfree
{{needs}} Inyandikorugero:Needs {{needs|req.}} Inyandikorugero:Needs
table-depends {{depends}} Inyandikorugero:Depends {{depends|vendor-defined}} Inyandikorugero:Depends
table-dropped {{dropped}} Inyandikorugero:Dropped {{dropped|discontinued}} Inyandikorugero:Dropped
{{terminated}} Inyandikorugero:Terminated {{terminated|fired}} Inyandikorugero:Terminated
incorrect {{incorrect}} Inyandikorugero:Incorrect {{incorrect|wrong}} Inyandikorugero:Incorrect
table-debate {{D-P}} Inyandikorugero:D-P {{D-P|present}} Inyandikorugero:D-P
{{D-A}} Inyandikorugero:D-A {{D-A|absent}} Inyandikorugero:D-A
{{D-I}} Inyandikorugero:D-I {{D-I|invited}} Inyandikorugero:D-I
{{D-O}} Inyandikorugero:D-O {{D-O|invited to other debate}} Inyandikorugero:D-O
{{D-N}} Inyandikorugero:D-N {{D-N|not invited}} Inyandikorugero:D-N
{{D-Nv}} Inyandikorugero:D-Nv {{D-Nv|not voting}} Inyandikorugero:D-Nv
{{D-W}} Inyandikorugero:D-W {{D-W|withdrawn}} Inyandikorugero:D-W
{{D-Out}} Inyandikorugero:D-Out {{D-Out|out of race}} Inyandikorugero:D-Out
table-cast[6] {{CMain}} Inyandikorugero:CMain {{CMain|text}} Inyandikorugero:CMain
{{CAlso starring}} Inyandikorugero:CAlso starring {{CAlso starring|costar}} Inyandikorugero:CAlso starring
{{CRecurring}} Inyandikorugero:CRecurring {{CRecurring|regular guest}} Inyandikorugero:CRecurring
{{CGuest}} Inyandikorugero:CGuest {{CGuest|victim}} Inyandikorugero:CGuest
{{COther}} Inyandikorugero:COther {{COther|ensemble}} Inyandikorugero:COther
{{CNone}} Inyandikorugero:CNone {{CNone|cast}} Inyandikorugero:CNone
{{CEmpty}} Inyandikorugero:CEmpty
{{CRemoved}} Inyandikorugero:CRemoved {{CRemoved|edited}} Inyandikorugero:CRemoved
{{CFinalist}} Inyandikorugero:CFinalist {{CFinalist|contender}} Inyandikorugero:CFinalist
{{CFinalist|place=3rd Place}} Inyandikorugero:CFinalist {{CFinalist|place=third place}} Inyandikorugero:CFinalist
{{exempt}} Inyandikorugero:Exempt {{Black Exempt}} Inyandikorugero:Black Exempt
{{nocontest}} Inyandikorugero:Nocontest {{nocontest|rescheduled}} Inyandikorugero:Nocontest
{{Runner-up}} Inyandikorugero:Runner-up {{Runner-up|2nd Place}} Inyandikorugero:Runner-up
{{Quit}} Inyandikorugero:Quit {{Quit|left}} Inyandikorugero:Quit
no class {{not yet}} Inyandikorugero:Not yet {{not yet|NY}} Inyandikorugero:Not yet
{{optional}} Inyandikorugero:Optional {{optional|non-mandatory}} Inyandikorugero:Optional
{{shade|100}}% Inyandikorugero:Shade% {{shade|color=blue|100}}% Inyandikorugero:Shade%
{{shade|75}}% Inyandikorugero:Shade% {{shade|color=blue|75|73–78}}% Inyandikorugero:Shade%
{{shade|25}}% Inyandikorugero:Shade% {{shade|color=blue|25|{{val|25|2|u=%}}}} Inyandikorugero:Shade
{{shade|0}}% Inyandikorugero:Shade% {{shade|color=blue|0}}% Inyandikorugero:Shade%
{{ColorCell}} Inyandikorugero:ColorCell {{ColorCell|Blank}} Inyandikorugero:ColorCell
{{ColorCell|type=lred}} Inyandikorugero:ColorCell {{ColorCell|type=lred|Red}} Inyandikorugero:ColorCell
{{ColorCell|type=lgreen}} Inyandikorugero:ColorCell {{ColorCell|type=lgreen|Green}} Inyandikorugero:ColorCell

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

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


Creating new templates

hindura

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: {{{align|center}}}; {{{style|}}}" class="automatic table-automatic"| {{{1|text}}}

Choosing a color

hindura

When changing or creating a new template, follow the use of colour guidelines and the when choosing the background color and, sometimes, the text color. Many of these templates can be used with links to other articles or references, so the links should be clearly identifiable against the background color. You can check contrast level using the WebAIM contrast checker by setting the foreground color to the blue link color. Contrast should be at the minimum WCAG AA level and, whenever possible, at WCAG AAA level. Wikipedia:Manual of Style/Accessibility/Colors has a set of colors that comply with WCAG AAA and WCAG AA for unvisited links and normal text.

Color subpage

hindura

All templates should either have a /bgcolor subpage that contains nothing but a valid CSS color code, possibly wrapped in nowiki tags, e.g. #BFD, which can be included with background: {{/bgcolor}}; in the style attribute, or they should reference another template's subpage, e.g. background: {{Template:Yes2/bgcolor}};. Alternatively, the /bgcolor subpage may redirect to another color code subpage: #REDIRECT [[yes2/bgcolor]].

This way, pages that are using these templates may also use {{legend}} and similar templates which can reference the actual color: {{legend|{{yes2/bgcolor}}|supported}}

TemplateData

hindura
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. Click here to see a monthly parameter usage report for this template based on this TemplateData.

TemplateData for Table cell templates

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

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
text1

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

Default
(template dependent)
Contentoptional
horizontal alignalign

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

Suggested values
left center right justified
Default
center
Stringoptional
stylestyle

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

Default
(template dependent)
Stringoptional
background colorcolor

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

Default
(template dependent)
Lineoptional

See also

hindura
  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. This template is related to Inyandikorugero:WikiProject link.
  4. This template is related to Inyandikorugero:WikiProject link.
  5. This group of templates is related to Inyandikorugero:WikiProject link.
  6. This group of templates is related to Inyandikorugero:WikiProject link.