# வார்ப்புரு:Table cell templates/doc

<noinclude></noinclude>  

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, makes a cell with a green background. The text in the cell is taken from the ; <code>yes|Sure}}</code> 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: <code>*table cell template*}} *text*</code> or <code>*table cell template*}} | *text*</code>. 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.* <code>colspan</code> or <code>rowspan</code>, they need to be put before the template call and there must be no vertical bar <code>|</code> in between them:  

| colspan=2 | } |
| --- | --- |
<pre>...  
! || ||rowspan=2  
|-  
|colspan=2  
...  
</pre>  

## Templates
<div>  
**Table cell templates**

| <code>table-rh</code> | Row header | Row header | Row header | Row header |
| --- | --- | --- | --- | --- |
| <code>table-yes</code> |  |  |  |  |
| <code>table-maybe</code> |  |  |  |  |
| <code>table-no</code> |  |  |  |  |
| <code>table-active</code> |  |  |  |  |
| <code>table-siteactive</code> |  |  |  |  |
| <code>table-siteinactive</code> |  |  |  |  |
| <code>table-yes2</code> |  |  |  |  |
| <code>table-no2</code> |  |  |  |  |
| <code>table-success</code> |  |  |  |  |
| <code>table-failure</code> |  |  |  |  |
| <code>table-partial</code> |  |  |  |  |
| <code>table-any</code> |  |  |  |  |
| <code>table-na</code> |  |  |  |  |
| <code>table-unknown</code> |  |  |  |  |
| <code>table-automatic</code> |  |  |  |  |
| <code>table-depends</code> |  |  |  |  |
| <code>table-included</code> |  |  |  |  |
| <code>table-dropped</code> |  |  |  |  |
| <code>table-beta</code> |  |  |  |  |
| <code>table-experimental</code> |  |  |  |  |
| <code>table-free</code> |  |  |  |  |
| <code>table-proprietary</code> |  |  |  |  |
| <code>table-nonfree</code> |  |  |  |  |
| <code>table-needs</code> |  |  |  |  |
| <code>table-nightly</code> |  |  |  |  |
| <code>table-release-candidate</code> |  |  |  |  |
| <code>table-draw</code> |  |  |  |  |
| <code>table-planned</code> |  |  |  |  |
| <code>table-scheduled</code> |  |  |  |  |
| <code>incorrect</code> |  |  |  |  |
| <code>noresult</code> |  |  |  |  |
| *no class* |  |  |  |  |
| Customized text |  |  |  |  |
| }</div> |  |  |  |  |

## Code
Common code to most if not all the templates in this series:  
:<code></code>  

Code specific to this template:  
:<code></code>  

To make a new table cell template you can use:  
<syntaxhighlight lang=text enclose="div"></syntaxhighlight>  

You should leave out the <code>align</code> parameter and often the <code>class</code> 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 <code>Dropped</code>, change that to <code></code>.| }  

## TemplateData

<templatedata>{  
"description": "One of several templates for styling individual table cells with standard contents and colors.",  
"params": {  
"1": {  
"label": "text",  
"description": "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",  
"type": "string/line",  
"default": "(template dependent)",  
"required": false  
},  
"align": {  
"label": "horizontal align",  
"description": "text alignment inside the cell, either *, *, '' or 'justified'",  
"default": "",  
"inherits": "1"  
},  
"style": {  
"label": "style",  
"description": "a semicolon separated list of additional CSS rules to be applied to the table cell",  
"default": "",  
"inherits": "1"  
},  
"color": {  
"label": "background color",  
"description": "a valid CSS color value or name to override the standard the cell background, only available with some templates",  
"inherits": "1"  
}  
}}</templatedata>