Difference between revisions of "Template:Abbr/doc"

From StarCraft AI, the resource for custom StarCraft Brood War AIs
Jump to: navigation, search
(Created page with "__NOTOC__ {{tl|abbr}} is an '''abbreviation''' template. == Usage == {{tl|abbr}} takes two unnamed parameters, in order: #The ''short form'', which shows as text on the page...")
 
(No difference)

Latest revision as of 18:56, 7 July 2015

{{abbr}} is an abbreviation template.

Usage

{{abbr}} takes two unnamed parameters, in order:

  1. The short form, which shows as text on the page
  2. The long form, which the short form is an abbreviation for

There is an option for a third parameter: adding "unicode" (or "u") applies {{unicode}} to the text of parameter 1. This may resolve rendering issues with browsers which do not apply the proper font to the text. Other fonts/languages may be added to the code as needed. If the third parameter is not defined, it will be ignored.

The template also has two named parameters:

  • |class=
  • |id=

which create the corresponding HTML attributes on the abbr element.

Examples

With two parameters

{{abbr|MSLP|Mean Sea Level Pressure}}

appears as MSLP. When hovering over the text, something like Mean Sea Level Pressure appears as a tooltip in many (but not all) browsers.

With three parameters

{{abbr|pȅći • пе̏ћи|to say|unicode}}

appears as Template:Unicode. Compare pȅći • пе̏ћи without the Unicode formatting.

With named parameters

{{abbr|UK|United Kingdom|class=country-name|id=foobar}}
appears as UK.