Template:Tooltip

From PZwiki
Notebook.pngTemplate Documentation

The template {{Abbr}} is used to write an abbreviation (including an acronym or initialism) with its meaning. It is a wrapper for the HTML element <abbr>...</abbr>, to create a tooltip indicating the meaning of the term. The {{Tooltip}} variant is the same, except it uses the <span>...</span> element, and is for providing mouse-over notes about non-abbreviations.

LightBulbYellow.png
Do not use {{Abbr}} or <abbr>...</abbr> to mark up material other than abbreviations (including acronyms). Using it to generate tooltips elsewhere is a misuse of the underlying HTML and causes accessibility problems. For general-purpose tooltips, use {{Tooltip}} instead.

Usage

Parameters

1 (required)
The term to be explained; displays as text.
2 (required)
The tooltip/pop-up.
style
Custom CSS styling for the tooltip text. Defaults to text-decoration: underline dotted; cursor: help;.

Examples

{{Tooltip|Schoolbag|Container}} -> Schoolbag

How to translate

This template doesn't need to/shouldn't be translated, but you can translate the documentation of this template with the following steps:

  1. Create a subpage of this template with the language code of the language you want to translate to.
  2. Copy the code wrapped in the <noinclude> tag in this template into the page you created.
    {{Translation guide}} template should be removed from the translated documentation.
  3. Translate the page according to the translation requirements of normal pages.

See also

Editors can experiment in this template's sandbox.