Changes

Jump to: navigation, search

Template:Abbr/doc

1,551 bytes added, 6 years ago
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..."
__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
#The ''long form'', which the short form is an abbreviation for

There is an option for a third parameter: adding "unicode" (or "u") applies {{tl|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:

* {{Para|class}}
* {{Para|id}}

which create the corresponding HTML attributes on the <code>abbr</code> element.

==Examples==
=== With two parameters ===

<pre>{{abbr|MSLP|Mean Sea Level Pressure}}</pre>

appears as {{abbr|MSLP|Mean Sea Level Pressure}}. When hovering over the text, something like <span style="border: black 1px solid;padding:2px;background-color:#fffbe1;">Mean Sea Level Pressure</span> appears as a tooltip in many (but not all) browsers.

=== With three parameters ===

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

appears as {{abbr|pȅći • пе̏ћи|to say|unicode}}. Compare {{abbr|pȅći • пе̏ћи|to say}} without the Unicode formatting.

=== With named parameters ===

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

<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
</includeonly>