Template:Div col
{{#ifeq:div col |doc
|
{{#ifeq:show |show
|| icon | This is a documentation subpage for Template:Terminate sentence It may contain usage information, categories and other content that is not part of the original {{#if: |{{{text2}}} |{{#if: |{{{text1}}} |{{#ifeq:Template |User |template template page |{{#if:Template |template page|article}}}}}}}}. |
}}{{#if:|
|{{#ifexist:Template:Div col
| [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
|
}}
}}
|
}}
{{#ifeq:Template:Div col|Template:Div col|| Warning | This template is used on approximately 491,000 pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
| Warning | This template is used on approximately 491,000 pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
| Property | Internet Explorer |
Firefox | Safari | Chrome | Opera |
|---|---|---|---|---|---|
| column-width column-count |
≥ 10 (2012) |
≥ 1.5 (2005) |
≥ 3 (2007) |
≥ 1 (2008) |
≥ 11.1 (2011) |
| columns | ≥ 10 (2012) |
≥ 9 (2011) |
≥ 3 (2007) |
≥ 1 (2008) |
≥ 11.1 (2011) |
| break-before break-after break-inside |
≥ 10 (2012) |
≥ 65 (2019) |
≥ 10 (2016) |
≥ 65 (2016) |
≥ 15 (2013) |
| File:Lua-Logo.svg | This template uses Lua: |
Lua error in Module:TNT at line 159: Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Uses TemplateStyles.tab.
The template {{div col}} (short for division columns) formats a list into columns that wrap at multiple screen resolutions responsively. It automatically breaks the available screen space into equal parts, meaning, for instance, that it is not necessary to guess how many columns to use and then figure out the dividing point(s), e.g., the halfway point to divide the list into two columns, or the one-third and two-thirds points to divide the list into three columns. To prevent a section of a list being broken, the template {{no col break}} can be used.
Usage
Basic usage
<syntaxhighlight lang="wikitext">{{div col}}
- a
- b
- c
- d
- e
- f
- g
- h
- a
- b
- c
- d
- e
- f
- g
- h
Parameters
There are six parameters for this template:
|{{SAFESUBST:#if:colwidth|colwidth=}}- Specifies the minimum width of the columns so that the number of columns is automatically based on screen width (that is, more columns will be shown on wider displays). If no value is supplied, the template uses a default of 30em. The width can be specified in any CSS relative or absolute length unit, for instance, the em (about the width of the capital "M" of the displayed typeface), e.g.,
colwidth=20em. |{{SAFESUBST:#if:rules|rules=}}yes- Adds vertical lines ("rules") between the columns if set to
yes. |{{SAFESUBST:#if:gap|gap=}}- Specifies the space between the content of adjacent columns, in any valid CSS width unit, e.g.,
gap=2em. The default spacing (set by browser) is 1em. |{{SAFESUBST:#if:class|class=}}- An HTML class, or multiple space-delimited classes, to apply to the columns.
|{{SAFESUBST:#if:style|style=}}- CSS styling to apply to the columns.
|{{SAFESUBST:#if:small|small=}}yes- Sets font size to 90%.
|{{SAFESUBST:#if:content|content=}}- Content to apply to the columns. This parameter is effectively equivalent to {{columns-list}}, which is a pass-through for this template.
Examples
Colwidth
- Fixed width
<syntaxhighlight lang="wikitext">{{div col|colwidth=10em}}
- a
- b
- c
- d
- e
- f
- g
- h
- a
- b
- c
- d
- e
- f
- g
- h
- Variable width
<syntaxhighlight lang="wikitext">{{div col|colwidth=10vw}}
- a
- b
- c
- d
- e
- f
- g
- h
{{div col end}}</syntaxhighlight> Produces:
}}{{#ifeq:|yes|}}
- a
- b
- c
- d
- e
- f
- g
- h
Rules
<syntaxhighlight lang="wikitext">{{div col|colwidth=10em|rules=yes}}
- a
- b
- c
- d
- e
- f
- g
- h
{{div col end}}</syntaxhighlight> Produces:
}}{{#ifeq:|yes|}}
- a
- b
- c
- d
- e
- f
- g
- h
Gap
<syntaxhighlight lang="wikitext">{{div col|colwidth=10em|rules=yes|gap=2em}}
- a
- b
- c
- d
- e
- f
- g
- h
{{div col end}}</syntaxhighlight> Produces:
}}{{#ifeq:|yes|}}
- a
- b
- c
- d
- e
- f
- g
- h
Small
<syntaxhighlight lang="wikitext">{{div col|small=yes}}
- a
- b
- c
- d
- e
- f
- g
- h
{{div col end}}</syntaxhighlight> Produces:
}}{{#ifeq:yes|yes|}}
- a
- b
- c
- d
- e
- f
- g
- h
Content
<syntaxhighlight lang="wikitext">{{div col|colwidth=10em|content=
- a
- b
- c
- d
- e
- f
- g
- h
}}</syntaxhighlight> Produces:
- b
- c
- d
- e
- f
- g
- h|* a
- b
- c
- d
- e
- f
- g
- h
}}{{#ifeq:|yes|}}
Multiple parameters
<syntaxhighlight lang="wikitext">{{div col|colwidth=10em|rules=yes|gap=2em|small=yes}}
- a
- b
- c
- d
- e
- f
- g
- h
{{div col end}}</syntaxhighlight> Produces:
}}{{#ifeq:yes|yes|}}
- a
- b
- c
- d
- e
- f
- g
- h
Text characters without list markup
<syntaxhighlight lang="wikitext">{{div col|colwidth=10em}} a b c d e f g h
{{div col end}}</syntaxhighlight> Produces:
}}{{#ifeq:|yes|}}
a b c d e f g h
Lorem ipsum
<syntaxhighlight lang="wikitext">{{div col}} {{lorem ipsum}}
{{div col end}}</syntaxhighlight> Produces:
}}{{#ifeq:|yes|}}
{{safesubst:#if:|Lorem ipsum|Lorem ipsum}} dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Limitation
Sub-lists
The underlying CSS system is unable to break sub-lists into columns. Note the uneven formatting below:
<syntaxhighlight lang="wikitext">{{div col|colwidth=10em|rules=yes|gap=2em|style=column-count:3|content=
- a
- b
- c
- c.d
- c.e
- c.f
- g
- h
}}</syntaxhighlight> Produces:
- b
- c
- c.d
- c.e
- c.f
- g
- h|* a
- b
- c
- c.d
- c.e
- c.f
- g
- h
}}{{#ifeq:|yes|}}
Turning off the <syntaxhighlight lang="text" class="" style="" inline="1">break-inside: avoid-column;</syntaxhighlight> rule appears to help.
Chrome-based browsers can separate images from captions
In certain circumstances, Chrome-based browsers can separate images from their captions, placing the caption in the next column. This bug was reported in 2018 as {{#if:|Phabricator: }}{{#if:T193163|{{#ifeq:T|T|T193163|TT193163}}{{#if:| ({{{label1}}})}}|Phabricator}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{2}}}|{{{2}}}]]|[[Phabricator:T{{{2}}}|T{{{2}}}]]}}{{#if:| ({{{label2}}})}}}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{3}}}|{{{3}}}]]|[[Phabricator:T{{{3}}}|T{{{3}}}]]}}{{#if:| ({{{label3}}})}}}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{4}}}|{{{4}}}]]|[[Phabricator:T{{{4}}}|T{{{4}}}]]}}{{#if:| ({{{label4}}})}}}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{5}}}|{{{5}}}]]|[[Phabricator:T{{{5}}}|T{{{5}}}]]}}{{#if:| ({{{label5}}})}}}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{6}}}|{{{6}}}]]|[[Phabricator:T{{{6}}}|T{{{6}}}]]}}{{#if:| ({{{label6}}})}}}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{7}}}|{{{7}}}]]|[[Phabricator:T{{{7}}}|T{{{7}}}]]}}{{#if:| ({{{label7}}})}}}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{8}}}|{{{8}}}]]|[[Phabricator:T{{{8}}}|T{{{8}}}]]}}{{#if:| ({{{label8}}})}}}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{9}}}|{{{9}}}]]|[[Phabricator:T{{{9}}}|T{{{9}}}]]}}{{#if:| ({{{label9}}})}}}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{10}}}|{{{10}}}]]|[[Phabricator:T{{{10}}}|T{{{10}}}]]}}{{#if:| ({{{label10}}})}}}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{11}}}|{{{11}}}]]|[[Phabricator:T{{{11}}}|T{{{11}}}]]}}{{#if:| ({{{label11}}})}}}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{12}}}|{{{12}}}]]|[[Phabricator:T{{{12}}}|T{{{12}}}]]}}{{#if:| ({{{label12}}})}}}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{13}}}|{{{13}}}]]|[[Phabricator:T{{{13}}}|T{{{13}}}]]}}{{#if:| ({{{label13}}})}}}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{14}}}|{{{14}}}]]|[[Phabricator:T{{{14}}}|T{{{14}}}]]}}{{#if:| ({{{label14}}})}}}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{15}}}|{{{15}}}]]|[[Phabricator:T{{{15}}}|T{{{15}}}]]}}{{#if:| ({{{label15}}})}}}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{16}}}|{{{16}}}]]|[[Phabricator:T{{{16}}}|T{{{16}}}]]}}{{#if:| ({{{label16}}})}}}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{17}}}|{{{17}}}]]|[[Phabricator:T{{{17}}}|T{{{17}}}]]}}{{#if:| ({{{label17}}})}}}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{18}}}|{{{18}}}]]|[[Phabricator:T{{{18}}}|T{{{18}}}]]}}{{#if:| ({{{label18}}})}}}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{19}}}|{{{19}}}]]|[[Phabricator:T{{{19}}}|T{{{19}}}]]}}{{#if:| ({{{label19}}})}}}}{{#if:|{{#iferror:{{#expr:1}}
|{{#switch:{{{1}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
|{{#switch:{{{2}}}
|fig=
|en=
|em=
|thin=
|hair=
|
}}
}}• {{#ifeq:T|T|[[Phabricator:{{{20}}}|{{{20}}}]]|[[Phabricator:T{{{20}}}|T{{{20}}}]]}}{{#if:| ({{{label20}}})}}}}{{#if:| ({{{label}}})}}, and it appears to be a bug in Chromium, tracked as issue 40578413.
Tracking categories
- {{#if:|{{{name}}}|Category:Pages using div col with unknown parameters}} (0) (for erroneous use of parameter names not documented here)
- {{#if:|{{{name}}}|Category:Pages using div col with small parameter}} (23)
TemplateData
|=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3ADiv+col%7CDiv+col%7CDiv+col%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|S|s}}ee a monthly parameter usage report] for {{#if:Div col|Template:Div col|this template}} in articles{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Div col|its|this}} TemplateData}}.
|None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3ADiv+col%7CDiv+col%7CDiv+col%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|P|p}}arameter usage report]{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Div col|its|this}} TemplateData}}
|for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3ADiv+col%7CDiv+col%7CDiv+col%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|P|p}}arameter usage report] for {{#if:Div col|Template:Div col|Template:Div col}}{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Div col|its|this}} TemplateData}}.
|#default=[1]{{#ifeq:{{safesubst:#switch: y |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Div col|its|this}} TemplateData}} }}|This is the {{#if:|TemplateData|TemplateData}} for this template used by TemplateWizard, VisualEditor and other tools. {{#switch:
|=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3ADiv+col%7CDiv+col%7CDiv+col%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|S|s}}ee a monthly parameter usage report] for {{#if:Div col|Template:Div col|this template}} in articles{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Div col|its|this}} TemplateData}}.
|None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3ADiv+col%7CDiv+col%7CDiv+col%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|P|p}}arameter usage report]{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Div col|its|this}} TemplateData}}
|for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3ADiv+col%7CDiv+col%7CDiv+col%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|P|p}}arameter usage report] for {{#if:Div col|Template:Div col|Template:Div col}}{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Div col|its|this}} TemplateData}}.
|#default=[2]{{#ifeq:{{safesubst:#switch: y |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Div col|its|this}} TemplateData}} }}}}
TemplateData for Div col
{{#switch:
{{#if:
| {{{demospace}}}
| {{#ifeq:Template|Template
| template
| other
}}
}}
| template = {{safesubst:#if:{{safesubst:#ifeq:Div col|sandbox|1}}{{safesubst:#ifeq:Div col|doc|1}}||
}} | other | #default = }} {{#switch: Div col |Div col=<templatedata> {
"description": "Breaks a list into columns. It automatically breaks each column to an equal space, so you do not manually have to find the halfway point on two columns. The list is provided by |content= or closed with .",
"params": { "colwidth": { "label": "Column width", "description": "Specifies the width of columns, and determines dynamically the number of columns based on screen width; more columns will be shown on wider displays.", "type": "string", "example": "22em", "default": "30em" }, "rules": { "label": "Rules", "description": "Produces vertical rules between the columns if set to yes.", "type": "string", "example": "yes" }, "gap": { "label": "Gap size", "description": "Specifies the space between the content of adjacent columns.", "type": "string", "example": "2em" }, "class": { "label": "HTML class", "description": "Specifies any class or multiple space-delimited classes.", "type": "string", "example": "plainlist nowrap" }, "style": { "label": "CSS style", "description": "Specifies any custom styling.", "type": "string" }, "content": { "label": "Content", "description": "Specifies the content to divide into columns", "type": "content" }, "small": { "label": "Small font", "description": "Use a smaller font size (90%)", "example": "yes", "type": "string" } } } </templatedata> |Div col end=<templatedata> {
"description": "Ends a multi-column list started by
}}{{#ifeq:|yes|}}. It takes no parameters.",
"params": {
}
} </templatedata> }}
Redirects
{{#ifeq:Div col|Div col/doc|Redirects to {{div col}}:}} {{#ifeq:Div col|Div col|
{{col div}}{{colbegin}}(but not{{col begin}}or{{col-begin}}){{cols}}{{div col start}}{{div col begin}}{{div-col}}{{palmares start}}
}}{{#ifeq:Div col|Div col/doc| Redirects to {{div col end}}:}}{{#switch:Div col|Div col end|Div col/doc=
{{col div end}}{{colend}}(but not{{col end}}or{{col-end}}){{div end}}{{divcol-end}}{{divcolend}}{{divend}}{{end div col}}{{end of solid block}}{{EndDivCol}}
}}
Column-generating template families
The templates listed here are not interchangeable. For example, using {{col-float}} with {{col-end}} instead of {{col-float-end}} would leave a {{#switch:pair
|c|close =
|e|empty|s|single|v|void
|o|open
|p|pair = <{{#if:yes|div|div}}{{#if:| {{{attribs}}}}}
}}{{#switch:pair
|c|close =
|e|empty|s|single|v|void = />
|o|open = >
|p|pair = {{#ifeq:div|!--||>}}...
}}{{#switch:pair
|e|empty|s|single|v|void
|o|open =
|c|close
|p|pair = {{#ifeq:div|!--|-->|</div>}}
}} open, potentially harming any subsequent formatting.
<section begin="table" />
| Type | Family | {{#ifeq: Handles wiki table code?{{safesubst:#switch: |
no | n | f | false | off | 0 = † | = † | ¬ = | yes | y | t | true | on | 1 = † | #default = †
}} | Handles wiki |
no | n | f | false | off | 0 = † | = † | ¬ = | yes | y | t | true | on | 1 = † | #default = †
}} | <div style="}}display: inline-block; line-height: 1.2em; padding: .1em 0; {{#ifeq: Handles wiki |
no | n | f | false | off | 0 = † | = † | ¬ = | yes | y | t | true | on | 1 = † | #default = †
}} | Handles wiki |
no | n | f | false | off | 0 = † | = † | ¬ = | yes | y | t | true | on | 1 = † | #default = †
}} | ">Handles wiki |
no | n | f | false | off | 0 = † | = † | ¬ = | yes | y | t | true | on | 1 = † | #default = † }} | width: 100%; }}{{#if:|}} | Responsive/ mobile suited |
Start template | Column divider | End template |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Float | "col-float" | Yes | Yes | {{col-float}} | {{col-float-break}} | {{col-float-end}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "columns-start" | Yes | Yes | {{columns-start}} | {{column}} | {{columns-end}} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Columns | "div col" | Yes | Yes | {{div col}} | instead use {{no col break}} | {{div col end}} | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "columns-list" | No | Yes | {{columns-list}} (wraps div col) | – | – | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Flexbox | "flex columns" | No | Yes | {{flex columns}} | – | – | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Table | "col" | Yes | No | {{col-begin}}, {{col-begin-fixed}} or {{col-begin-small}} |
{{col-break}} or {{col-2}} .. {{col-5}} |
{{col-end}} |
{{safesubst:#switch:
|no |n |f |false |off |0 = † | = † |¬ = |yes |y |t |true |on |1 = † |#default = †
}} Can the template handle the basic wiki markup {| | || |- |} used to create tables? If not, special templates that produce these elements (such as {{(!}}, {{!}}, {{!!}}, {{!-}}, {{!)}}) or HTML tags ({{#switch:pair
|c|close = |e|empty|s|single|v|void |o|open |p|pair = <{{#if:|table|table}}{{#if:| {{{attribs}}}}} }}{{#switch:pair |c|close = |e|empty|s|single|v|void = /> |o|open = > |p|pair = {{#ifeq:table|!--||>}}... }}{{#switch:pair |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:table|!--|-->|</table>}} }},{{#switch:pair |c|close = |e|empty|s|single|v|void |o|open |p|pair = <{{#if:|tr|tr}}{{#if:| {{{attribs}}}}} }}{{#switch:pair |c|close = |e|empty|s|single|v|void = /> |o|open = > |p|pair = {{#ifeq:tr|!--||>}}... }}{{#switch:pair |e|empty|s|single|v|void |o|open = |c|close |p|pair = {{#ifeq:tr|!--|-->|</tr>}} }}, etc.) need to be used instead.<section end="table" />
See also
- {{refbegin}} and {{refend}} (for columns in manual lists of references)
- {{columns-list}} (wraps div col)
{{safesubst:#if:{{safesubst:#ifeq:Div col|sandbox|1}}{{safesubst:#ifeq:Div col|doc|1}}| | {{#switch:Div col |div col= |div col end=}} }}
- Pages with script errors
- Pages with broken file links
- Documentation subpages without corresponding pages
- Lua-based templates
- Pages using div col with small parameter
- Templates using TemplateData
- Pages using Template:Longitem with unnamed style parameter
- Multi-column templates
- Templates that add a tracking category