Template:Abbr

Revision as of 17:56, 7 July 2015 by Warwolf30 (talk | contribs) (Created page with "<abbr title="{{#tag:nowiki|{{{2|}}}}}">{{#switch: {{{3|}}} | u | unicode | Unicode = {{ unicode |{{{1|}}}}} | i | IPA = {{ IPA |{{{1|}}}}} | {{{1|}}} }}</abbr><noi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

(view - edit) Documentation


{{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.