• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Flag decoration/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Flag decoration
(Redirected from Template:Flagdeco/sandbox)
This is the template sandbox page for Template:Flag decoration (diff).
See also the companion subpage for test cases.
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 92,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.
Shortcut
  • {{flagdecoTemplate:Flagdeco}}

Displays the flag identified by the parameter in "icon" size, currently 22x20 pixels plus a one pixel border. This template is very similar to {{flag icon}}, except the image is not linked to an article, i.e. it is "purely decorative" per World Wide Web Consortium (W3C) Web Content Accessibility Guidelines (WCAG). This template can be used when the article text immediately adjacent to the icon provides the associated link for the flag.

Comparison example
  • {{flag icon|United Kingdom}} → United Kingdom
  • {{Flag decoration|United Kingdom}} →
Usage examples
  • {{Flag decoration|Portugal}} [[Lisboa]], [[Portugal]] → Lisboa, Portugal
  • {{Flag decoration|Portugal}} [[Portuguese First Republic|Portugal]] → Portugal

As with {{flag icon}}, a particular variant of the flag and/or a custom size for the icon may be specified using (respectively) |variant= and/or |size=. See {{flag icon}} for further details.

Also as with {{flag icon}}, the display of a redlink when Template:Country data Foo does not exist can be suppressed by using the |noredlink=yes parameter. See {{flag icon}} for further details.

Tracking categories

edit

Where {{Flag decoration|Foo}} is used, but the Template:Country data Foo does not exist, then a redlink is displayed, unless the |noredlink=yes parameter has been set.

Where the redlink is displayed, the page is addded to a tracking category:

  • Category:Flag decoration missing country data templates (population: 80)

See also

edit
  • Wikipedia:WikiProject Flag Template
  • Wikipedia:Alternative text for images
The above documentation is transcluded from Template:Flag decoration/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Flag_decoration/sandbox&oldid=1289392567"
Last edited on 8 May 2025, at 09:35

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 8 May 2025, at 09:35 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop