FANDOM



Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [purge/refresh]

Displays a flag image.

Usage

{{Flag|<name or code> |c=caption|s=size|l=link|b=|loc=}}

  • This template uses the sub-template {{Flag/Image}} to determine the correct flag image.
  • This template uses the sub-template {{Flag/Caption}} to determine the correct default caption.

name or code

(Required) - Flag name or code.
c=
(Semi-Optional) - Changes or Adds a caption to the image
(Optional) - If a caption already exists in the sub-template {{Flag/Caption}}.
(Required) - If no caption exists in the sub-template {{Flag/Caption}}.
s=
(Optional) - Flag size, in px (default is 20).
l=
(Optional) - Links the image to a page or interlanguage link if flag is clicked.
b=
(Optional) - Removes the border from the flag.
loc=
(Optional) - Used to tell the flag to show on the left, center, or right side of the page.

Examples

{{Flag|us}} produces Us

{{Flag|blah}} produces "Flag image for blah does not exist in {{Flag/Image}}"!

{{Flag|Test test}} produces Alpha

{{Flag|Test test |b=}} produces Alpha

{{Flag|Test test|l=Main Page}} produces Alpha

{{Flag|uK|c=Test|s=40}} produces Gb

{{Flag|UK|c=Test|s=60}} produces Gb

{{Flag|US|c=Another test|s=40|l=Main Page}} produces Us

{{Flag|test test|loc=left}} produces
Alpha


{{Flag|test test|loc=center}} produces
Alpha


{{Flag|test test|loc=right}} produces
Alpha



The above text is transcluded from Template:Flag/doc.
You can change it or view its history. (How does this work?)
If you're done making changes, please refresh the text. (Why?)
You can experiment in this template's Sandbox (create | Mirror ) and Testcases (create) pages.
Please add categories and interwikis to Template:Flag/doc. (View all subpages of this page.)
Community content is available under CC-BY-SA unless otherwise noted.