Jump to content

Template:Flag icon

Preview

Code Result
{{Flag icon|India}}
{{Flag icon|IND}}
{{Flag icon|USA}}
{{Flag icon|UK|name=yes}}  United Kingdom
{{Flag icon|Japan|size=40px}}
{{Flag icon|Nepal|border=no|link=no}}

Shows a small country flag. Works without Lua/Scribunto; needs ParserFunctions and the flag images (InstantCommons, or uploaded locally).

Parameters

  • 1 (required): country name, alias or ISO code, e.g. India, IN, IND, USA, UK, UAE.
  • 2 (optional): page to link to instead of the country article, e.g. India national cricket team.
  • name: yes also shows the country name after the flag (like {{flag}}).
  • size: default 23x15px.
  • link: no for no link, or a page name.
  • border: no removes the thin border (use for Nepal).
  • file: use a specific flag file, e.g. Flag of India (1931).svg for a historical flag.
  • alt: alt text for screen readers.

TemplateData

Shows a small flag icon for a country, optionally with its name.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Country1

Country name, alias or ISO code, e.g. India, IN, IND.

Linerequired
Link target2

Page to link to instead of the country article.

Page nameoptional
Show namename

yes = also show the country name.

Booleanoptional
Sizesize

Image size.

Default
23x15px
Lineoptional
Linklink

no = no link, or a page name.

Lineoptional
Borderborder

no = no border.

Suggested values
no
Lineoptional
Flag filefile

Use a specific flag file instead of the default.

Fileoptional
Alt textalt

no description

Lineoptional