Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Full syntax  





2 Parameters  





3 Examples  














Template:Aligned table






Afrikaans
Аԥсшәа
العربية
Azərbaycanca
تۆرکجه
Basa Bali

 / Bân-lâm-gú
Башҡортса
Беларуская
Беларуская (тарашкевіца)
Български
Bosanski
Català
Cebuano
Corsu
Dansk
الدارجة

Ελληνικά
Farefare
فارسی
Fiji Hindi
Føroyskt
Français
Galego
ГӀалгӀай

  / Gõychi Konknni
/Hak-kâ-ngî

Հայերեն
ि
Ilokano
Bahasa Indonesia
Ирон
Íslenska

Kurdî
Ladin
Latviešu
Lëtzebuergesch
Lietuvių
Magyar
Madhurâ
ि
Македонски

Māori
مصرى
مازِرونی
Bahasa Melayu
 / Mìng-dĕ̤ng-nḡ
Мокшень



Нохчийн
Norsk nynorsk
Oʻzbekcha / ўзбекча


پښتو
Português
Română
Русский

Scots
Sesotho
Shqip
Simple English
سنڌي
Slovenščina
کوردی
Српски / srpski
Suomi
Svenska
Tagalog



Türkçe
Türkmençe
Українська
اردو
Vèneto
Tiếng Vit



 

Edit links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 




In other projects  



Wikimedia Commons
Meta-Wiki
Wikibooks
Wikisource
Wikiversity
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 


The purpose is of this template is for generating simple tables in locations where standard table markup is either not possible, without significant use of the {{!}} magic word (e.g., with a {{sidebar}} template), or cumbersome (due to the repetitive use of specification of the same style statement in each row). This template should not be used to replace standard table markup in articles. This template is meant to be complementary to {{infobox}}or{{sidebar}}, and not a replacement for {{infobox}}or{{sidebar}}.

A simpler method to include a table in a template that does not directly support table markup is to create the table in a sub-template using standard markup and transclude it.

Full syntax

For parameter explanations, see table below.

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

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

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

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

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

Parameters

Parameter Description Examples Default
title Table caption above table. The caption is optional. |title=Caption: example table Not set
cols Number of columns in the table. |cols=4 2
fullwidth If set (to anything, "on", "true", "yes", etc.), ensures 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
Not set
style CSS styling applied to the table. |style=width:80%;background:transparent; Not set
colwidth Width of each column (or include "width:...;" in colstyle). |colwidth=6.0em   |colwidth=25% Not set
colstyle CSS styling prepended to the cell style for each column. |colstyle=background:transparent; Not set
rowstyle CSS styling applied to each row. |rowstyle=text-align:center; vertical-align:top;
leftright If set (to anything, "on", "true", "yes", etc.) is equivalent to |col1align=left and |col2align=right |leftright=on Not set
rightleft If set (to anything, "on", "true", "yes", etc.) is equivalent to |col1align=right and |col2align=left |rightleft=on Not set
colCwidth CSS width property of cell in column C (or include "width:...;" in colCstyle). |col2width=9.0em   |col3width=35% Not set
colCclass Classes added to cell in column C. |col1class=hlist Not set
colCalign CSS text-align property (left / right / center) of cell in column C's cell contents (or include "text-align:...;" in colCstyle). |col4align=right Not set
colCnowrap If set (to anything, "on", "true", "yes", etc.) adds "white-space:nowrap;" to the CSS style of cell in column C (i.e., to prevent lines within its cells from wrapping; or include "nowrap" in colCclass or "white-space:nowrap;" in colCstyle). |col5nowrap=on
colCstyle CSS style appended to cell in column C. |col4style=font-style:italic; Not set
colCheader If set (to any value), changes cells in column C to table headers (headings). |col1header=on Not set
rowRclass Classes applied to row R. |row10class=hlist Not set
rowRstyle CSS styling applied to row R. |row2style=font-weight:bold;
rowRheader If set (to any value), changes cells in row R to table headers (headings). |row1header=on Not set
classR.C Classes applied to cell in row R, column C. Overrides any other class attributions (rowRclass, colCclass). |class1.2=adr Not set
styleR.C CSS styling applied to cell in row R, column C. Overrides any more general styling (leftright, colCalign, rowRstyle, etc). |style5.3=text-align:right; Not set
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. | Azerbaijan | Malta | Zaire Not set

Examples

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

Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Aligned_table&oldid=972001240"

Categories: 
Lua-based templates
Table templates
Hidden category: 
Wikipedia template-protected templates
 



This page was last edited on 9 August 2020, at 16:18 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki