Difference between revisions of "Template:Abbr"

From Emulation General Wiki
Jump to navigation Jump to search
m
 
Line 1: Line 1:
 
<noinclude>'''The abbr template is used to write an abbreviation (including an acronym or initialism) with its expanded meaning.'''</noinclude>
 
<noinclude>'''The abbr template is used to write an abbreviation (including an acronym or initialism) with its expanded meaning.'''</noinclude>
 
 
<abbr {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} title="{{#tag:nowiki|{{#invoke:String|replace|{{{2|}}}|"|&quot;}}}}">{{{1|}}}</abbr><noinclude>{{Documentation}}
 
<abbr {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} title="{{#tag:nowiki|{{#invoke:String|replace|{{{2|}}}|"|&quot;}}}}">{{{1|}}}</abbr><noinclude>{{Documentation}}
 
</noinclude>
 
</noinclude>
 
</center><noinclude>[[Category:Text templates]]</noinclude>
 
</center><noinclude>[[Category:Text templates]]</noinclude>

Latest revision as of 01:12, 16 March 2024

The abbr template is used to write an abbreviation (including an acronym or initialism) with its expanded meaning.

Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
Visit Template:Abbr/doc to edit this documentation. (How does this work?)


The template {{Abbr}} is used to write an abbreviation with its meaning. It is a wrapper for the HTML element <abbr>...‎</abbr>, the element used by most web browsers to create a tooltip indicating the meaning of an abbreviation or acronym.

Please note: Do not use {{abbr}} or <abbr> to mark up material other than abbreviations or acronyms. Using it to generate tooltips elsewhere is a misuse of the underlying HTML and causes accessibility problems

Usage[edit]

The template takes two unnamed parameters.

1
abbreviation – the abbreviation, acronym, or initialism to be explained; shows as text, and may use wikimarkup, such as a link to an article about what it refers to.
2
meaning – the expansion or definition of the abbreviated term; shows as the popup when you hover over the abbreviation. No wikimarkup can be used in this parameter.

Example[edit]

{{abbr|WMF|Wikimedia Foundation}}

WMF

Linking must be done a particular way[edit]

To wiki-link the abbreviation being marked up by this template, wrap the template in the link, not vice-versa, or the meaning will not appear in some browsers, including Chrome.

Compatibility Markup Renders as
Compatible [[mediawikiwiki:Wikimedia Foundation|{{abbr|WMF|Wikimedia Foundation}}]] WMF
Less compatible {{abbr|Wikimedia Foundation|[[mediawikiwiki:WMF|Wikimedia Foundation]]}}

Wikimedia Foundation