Template:Aligned table/doc

For parameter explanations, see table below.

Template:Aligned table/doc

Full syntax

For parameter explanations, see table below.

{{Aligned table
| cols = 
| fullwidth = 
| class = 
| style = 
| colwidth = 
| leftright = 
| colstyle =
| rowstyle = 

<!--for Cth column:-->
| colCwidth = 
| colCclass = 
| colCalign = 
| colCstyle = 
| colCnowrap = 

<!--for Rth row:-->
| rowRclass = 
| rowRstyle = 

<!--for cell R,C:-->
| classR.C = 
| styleR.C = 

| (cell 1,1) | (cell 1,2) | ... | ...
}}

Parameters

Parameter Description Examples Default
cols Number of columns in the table. |cols=4 2
fullwidth Set to anything ("on", "true", "yes", etc) to ensure table spans entire width available.
(Effect is to remove border-spacing and add width:100% to the table's styling.)
|fullwidth=on not set
class CSS/HTML class/es applied to the table. |class=wikitable   |class=infobox
|class=sortable nowrap   |class=sidebar
none
style CSS styling applied to the table. |style=width:80%;background:transparent; none
colwidth Width of each column (or include "width:…;" in colstyle). |colwidth=6.0em   |colwidth=25% not set
colstyle CSS styling applied to each column. |colstyle=background:transparent; "
rowstyle CSS styling applied to each row. |rowstyle=text-align:center; "
leftright Set to anything ("on", "true", "yes", etc) in place of |col1align=left and |col2align=right |leftright=on not set
col[C]width Width of column number [C] (or include "width:…;" in col[C]style). |col2width=9.0em   |col3width=35% none set
col[C]class Class/es applied to column number [C]. |col1class=navbox-group "
col[C]align Alignment (left / right / center) for column [C]'s cell contents (or include "text-align:…;" in col[C]style). |col4align=right none set
col[C]nowrap Set to anything ("on", "true", "yes", etc) to add "white-space:nowrap;" to column [C]'s cell styling (i.e. to prevent lines within its cells from wrapping; or include "nowrap" in col[C]class or "white-space:nowrap;" in col[C]style). |col5nowrap=on "
col[C]style CSS styling applied to column number [C]. |col4style=font-style:italic; "
row[R]class Class/es applied to row number [R]. |row10class=navbox-abovebelow none set
row[R]style CSS styling applied to row number [R]. |row2style=font-weight:bold; "
class[R].[C] Class/es applied to cell in row [R], column [C]. Overrides any other class attributions (row[R]class, col[C]class). |class1.2=adr none set
style[R].[C] CSS styling applied to cell in row [R], column [C]. Overrides any more general styling (leftright, col[C]align, row[R]style, etc). |style5.3=text-align:right; "
Unnamed parameters Each unnamed parameter is taken to be the next cell in the table, starting at the table's top left corner and working left to right from top to bottom.

Examples

{{Aligned table
|cols=3 |class=wikitable
| A | 1 | a
| B | 2 | b
}}
A 1 a
B 2 b
{{Aligned table
|cols=4 |class=wikitable
|col1align=center |col2align=center
|col3align=right  |col4align=right
| AAA | aa    | 123  | 12345
| B   | bbbbb | 1234 | 2
}}
AAA aa 123 12345
B bbbbb 1234 2
{{Aligned table
|class=wikitable |style=width:20em;
|col1align=center |col2align=right
| AAA | 123
| B   | 2
}}
AAA 123
B 2
{{Aligned table
|cols=3 |class=wikitable sortable
|row1header=y
| U | # | l
| A | 1 | a
| B | 2 | b
}}
U # l
A 1 a
B 2 b

See also


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.

  1. 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:
  2. 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.
  3. 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.
  4. 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.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.