Difference between revisions of "Template:Abbr/doc"

From comp.tf
Jump to navigation Jump to search
(Created page with "==Usage== This template allows for abbreviations to be explained with tooltips upon hovering over said abbreviation.<br> More info can be found on the [https://en.wikipedia.or...")
 
m (Typo fix)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
This template allows for abbreviations to be explained with tooltips upon hovering over the abbreviation.<br />
 +
More info can be found on the [https://en.wikipedia.org/wiki/Template:Abbr Wikipedia template]
 
==Usage==
 
==Usage==
This template allows for abbreviations to be explained with tooltips upon hovering over said abbreviation.<br>
+
<code><nowiki>{{abbr|</nowiki>'''<nowiki>Abbreviated text</nowiki>'''<nowiki>|</nowiki>'''<nowiki>Meaning</nowiki>'''<nowiki>}}</nowiki></code>
More info can be found on the [https://en.wikipedia.org/wiki/Template:Abbr Wikipedia template]
+
* '''Abbreviated Text''' - the abbreviation, shown as underlined text
===Parameters===
 
* '''Class''' - in this case use the <code>abbr</code> class
 
* '''Abbreviated Text''' - the abbreviation, shown as text
 
 
* '''Meaning''' - the meaning, shown as a tooltip
 
* '''Meaning''' - the meaning, shown as a tooltip
 
==Example==
 
==Example==
{| class="wikitable" style="width:50%; padding:5px"
+
{| class="wikitable" style="text-align:center"
!You Type
+
! style="background-color: #1c1c1c; color: white" colspan="3" | You type
!You Get
+
! style="background-color: #1c1c1c; color: white" colspan="3" | You get
 
|-
 
|-
|style="text-align:center" | <tt><nowiki>{{abbr|UK|United Kingdom}}</nowiki></tt>
+
| style="border-right:hidden" |
|style="text-align:center" | {{abbr|UK|United Kingdom}}
+
| style="text-align:center" | <code><nowiki>{{abbr|UK|United Kingdom}}</nowiki></code>
 +
| style="border-left:hidden" |
 +
| style="border-right:hidden" |
 +
| style="text-align:center" | {{abbr|UK|United Kingdom}}
 +
| style="border-left:hidden" |
 
|}
 
|}
When hovering over the text "{{abbr|UK|United Kingdom}}", the tooltip "United Kingdom" will appear in most browsers.
+
When hovering over the text "{{abbr|UK|United Kingdom}}", the tooltip "United Kingdom" will appear in most browsers.<br /><br />
 +
Note that the template is not limited to only abbreviations, how it is used is all up to the user. For example: {{abbr|$|USD}}, though not an abbreviation, is still a use of Template:Abbr
  
[[Category:Template]]</noinclude>
+
[[Category:Template]]

Latest revision as of 22:03, 24 March 2016

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

Usage[edit]

{{abbr|Abbreviated text|Meaning}}

  • Abbreviated Text - the abbreviation, shown as underlined text
  • Meaning - the meaning, shown as a tooltip

Example[edit]

You type You get
{{abbr|UK|United Kingdom}} UK

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

Note that the template is not limited to only abbreviations, how it is used is all up to the user. For example: $, though not an abbreviation, is still a use of Template:Abbr