Template:Cell/doc
| This is a documentation subpage for Template:Cell. It may contain usage information, categories and other content that is not part of the original template page. |
The {{cell}} template can be used to create a table cell with a specified background color.
Usage
{{cell|COLOR}}
The template takes one unnamed parameter as input, which is the background color of the table cell. The default content of each cell is a single thin space with a font-size of 50%. To override the content of each cell, use a second unnamed parameter. To override the default font-size, use the style= parameter.
- Complete specification
{{cell|Color|Text|style=Style}}
- Default
{{cell|Color| |style=font-size:50%;}}
Examples
Example 1
- Code
{| width="50%" cellspacing=0
{{cell|red}}{{cell|blue}}{{cell|green}}
|}
- Result
Example 2
- Code
{| width="50%" cellspacing=0
{{cell|red| }}{{cell|blue| }}{{cell|green| }}
|}
- Result
Example 3
- Code
{| width="50%" cellspacing=0
{{cell|red|R|style=text-align:center}}{{cell|blue|B|style=text-align:center}}{{cell|green|G|style=text-align:center}}
|}
- Result
| R | B | G |
Note
The {{cell2}} and {{cell3}} templates can be used to condense a sequence of cells of the same color.
See also
- {{cell2}} – two consecutive equal {{cell}} calls
- {{cell3}} – three consecutive equal {{cell}} calls
- {{cells}} – up to twenty consecutive equal {{cell}} calls
- {{color box}}
- {{color strip}}
- {{scarf}}
- {{cell1}} – one {{cell}} call, designed for compatibility with {{cell2}} and family
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.