Difference between revisions of "Template:Abbr"

From comp.tf
Jump to navigation Jump to search
(Added text/explaination)
m (fix?)
Line 1: Line 1:
<abbr {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} title="{{#tag:nowiki|{{{2|}}}}}">{{#switch: {{{3|}}}
+
<abbr {{#if:{{{class|}}}|class="{{{class}}}"}}{{#if:{{{id|}}}|id="{{{id}}}"}}{{#if:{{{style|}}}|style="{{{style}}}"}}title="{{#tag:nowiki|{{{2|}}}}}">{{#switch: {{{3|}}}
  | u | unicode | Unicode = {{Unicode|{{{1|}}}}}
+
|u|unicode|Unicode={{Unicode|{{{1|}}}}}
  | i | IPA = {{IPA|{{{1|}}}}}
+
|i|IPA={{IPA|{{{1|}}}}}
  | {{{1|}}} }}</abbr>
+
|{{{1|}}}}}</abbr>
 
<noinclude>
 
<noinclude>
 
==Usage==
 
==Usage==

Revision as of 05:38, 25 July 2015

Usage

This template allows for abbreviations to be explained with tooltips upon hovering over said abbreviation.
More info can be found on the Wikipedia template

Parameters

  • Class - in this case use the abbr class
  • Abbreviated Text - the abbreviation, shown as text
  • Meaning - the meaning, shown as a tooltip

Example

You Type You Get
{{abbr|UK|United Kingdom}} UK

When hovering over the text "UK ", the tooltip "United Kingdom" will appear in most browsers.