Jump to content

Template:ListFlag/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Tags: Mobile edit Mobile web edit Advanced mobile edit
Tags: Mobile edit Mobile web edit Advanced mobile edit
Line 6: Line 6:
==Syntax==
==Syntax==
<syntaxhighlight>{{ListFlag|flag name|size|border=|checker=|alt=}}</syntaxhighlight>
<syntaxhighlight>{{ListFlag|flag name|size|border=|checker=|alt=}}</syntaxhighlight>
The first parameter should be any flag file name without <code>File:</code> prefix (default: Flag of None.svg), the second parameter is used to specify image size (default: 100x100px), the {{Para|border}} parameter can be used to cancel the border, the {{Para|checker}} parameter can be used to generate a checkered background to indicate transparency, which appears when the cursor is hovered over the image, or long press the image on touch screen.
The first parameter should be any flag file name without <code>File:</code> prefix (default: Flag of None.svg), the second parameter is used to specify image size (default: 100x100px), the {{Para|border}} (or {{Para|b}}) parameter can be used to cancel the border, the {{Para|checker}} (or {{Para|c}}) parameter can be used to generate a checkered background to indicate transparency, which appears when the cursor is hovered over the image, or long press the image on touch screen.


The alternative text can be added with {{Para|alt}} parameter or {{Para|title}} parameter (with a tooltip).
The alternative text can be added with {{Para|alt}} parameter or {{Para|title}} parameter (with a tooltip).

Revision as of 16:11, 8 October 2020

This template is used to display a flag in a table, especially for flag lists, and improve the display of flag where standard image syntax is either not possible. On mobile devices, this template will prevent the image from being resized to smaller size.

Syntax

{{ListFlag|flag name|size|border=|checker=|alt=}}

The first parameter should be any flag file name without File: prefix (default: Flag of None.svg), the second parameter is used to specify image size (default: 100x100px), the |border= (or |b=) parameter can be used to cancel the border, the |checker= (or |c=) parameter can be used to generate a checkered background to indicate transparency, which appears when the cursor is hovered over the image, or long press the image on touch screen.

The alternative text can be added with |alt= parameter or |title= parameter (with a tooltip).

Examples

{|
|{{ListFlag|Flag of Denmark.svg}}
|{{ListFlag|Flag of Ohio.svg|120px|border=no}}
|{{ListFlag|Bowman Flag.svg|150px|border=no|checker=yes}}
|}