Outputs the ratio character (U+2236) between two optional arguments or instead of any colon character in a single argument.

Template parameters

ParameterDescriptionTypeStatus
width1

width or larger of both dimensions

Numberoptional
height2

height or smaller of both dimensions

Numberoptional

Example Usage

Source Output Comment
<syntaxhighlight lang="html">{{ratio}}</syntaxhighlight>
<syntaxhighlight lang="html">4{{ratio}}3</syntaxhighlight> 4∶3
<syntaxhighlight lang="html">{{ratio|4|3}}</syntaxhighlight> 4∶3
<syntaxhighlight lang="html">{{ratio|4|3|2}}</syntaxhighlight> 4∶3 only two parameters are supported
<syntaxhighlight lang="html">{{ratio|4}}</syntaxhighlight> 4∶1 "∶1" is automatically added when only 1 argument with no colon is given
<syntaxhighlight lang="html">{{ratio|4:3}}</syntaxhighlight> 4∶3 Single argument with colon is replaced with ratio symbol.
<syntaxhighlight lang="html">{{ratio|4:4:4}}</syntaxhighlight> 4∶4∶4 Works with multiple colons

See also