Template:Font/doc

About[edit]

{{font}} is used to define text styles, for example, size and color. It can also be used to inject CSS. This can be useful when needed to change "I" in Arial to "I" in Times New Roman, since in Arial, uppercase "I" looks the same as lowercase "L".

Use[edit]

{{font|TEXT(or「text=TEXT」)|font=FONT|size=SIZE(px/em/pt/%)|color=COLOR|bgcolor=BACKGROUND COLOR|css=CSS}}

Examples[edit]

Markup Display
{{font|text=Some text.|font=|size=|color=}} Some text.
{{font|text=Some text.|font=Comic Sans MS|size=20px|color=#7f5620}} Some text.
{{font|Illinois|font=Times New Roman|size=20px}} Illinois
{{font|Illinois|font=Arial|size=20px}} Illinois
{{font|text=Hello World!|font=Century Gothic|size=35px|color=#bf00bf}} Hello World!

Defaults[edit]

Parameter Default
font Sans-serif
size 100%
color black
bgcolor transparent

Limitations[edit]

This template should not be used around multiple paragraphs. For example, it should not be used around multiple bullet or numbered points or more than one cell of a table. It may, however, surround as many uses of <br /> as desired.

Template data[edit]

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools.

TemplateData for Font

Template data parameterlist

No description.

Template parameters

ParameterDescriptionTypeStatus
Texttext

no description

Unknownoptional
11

no description

Unknownoptional
Fontfont

no description

Unknownoptional
Sizesize

no description

Unknownoptional
Colorcolor

no description

Unknownoptional
Bgcolorbgcolor

no description

Unknownoptional
Titletitle

no description

Unknownoptional
Csscss

no description

Unknownoptional

Font size templates

Code for inline content Code for block content Size Result
{{small|text}}
{{smaller|text}}
{{smalldiv|text}} 85% text
{{resize|text}} {{resizediv|text}} 90% text
{{midsize|text}} {{midsizediv|text}} 92% text
100% text
{{large|text}}
{{larger|text}}
{{big|text}}
{{largediv|text}} 120% text
{{huge|text}} 180% text
{{resize|x%|text}} {{resizediv|x%|text}} custom varies
{{font|size=x%}} custom varies