{{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
| This template is used on approximately 12,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
{{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".
{{font|TEXT(or「text=TEXT」)|font=FONT|size=SIZE(px/em/pt/%)|color=COLOR|bgcolor=BACKGROUND COLOR|css=CSS}}
Note that for accessibility reasons MOS:FONTSIZE says: "No text should be reduced below 85% of the page's default font size." Also, font sizes should be set as percentages, not fixed font sizes, because: "This improves accessibility for visually impaired users who use a large default font size."
If a table has been set overall to style="font-size:90%;", then setting an individual cell to {{font|size=85%|...}} actually is 0.85 of 0.9 which is 76.5%.
textfontsizepx, em, pt, %.colorbgcolorcss
| Markup | Display |
|---|---|
{{font|text=Some text.|font=|size=|color=}} |
Some text. |
{{font|text=Some text.|font=Comic Sans MS|size=20px|color=green}} |
Some text. |
{{font|Illinois|font=Times New Roman|size=20px}} |
Illinois |
{{font|Illinois|font=Arial|size=20px}} |
Illinois |
{{font|Коричневый текст.|font=Times New Roman Cyr|size=20px|color=#7f5620}}
|
Коричневый текст. |
{{font|text=Hello World!|font=Century Gothic|size=35px|color=#bf00bf}}
|
Hello World! |
{{font|text=囧囧囧囧囧|font=Simhei|color=#c9b295|bgcolor=#364d6a}}
|
囧囧囧囧囧 |
{{font|text=You can use all available parameters, |font=Georgia|size=20px|color=#5a7aad|bgcolor=#f9f9ef}}
|
You can use all available parameters, |
{{font|text=or just a single one.|size=25px}}
|
or just a single one. |
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.
TemplateData for Font
Template data parameterlist
| |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Set text font, size, and color.
| |||||||||||||||||||||||||||||||||||||||||||||
| Code for inline content | Code for block content | Size | Result |
|---|---|---|---|
{{small|text}} |
{{smalldiv|text}} |
85% | text |
{{resize|text}} |
{{resizediv|text}} |
90% | text |
| none | none | 100% | text |
{{large|text}} |
{{largediv|text}} |
120% | text |
{{huge|text}} |
180% | text | |
{{resize|x%|text}} |
{{resizediv|x%|text}} |
custom | varies |
{{font|size=x%}} |
custom | varies |
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.