Template:Ref/doc

Ref-family templates
The ref family of templates is used to place labeled references and notes and references into an article, with the labels normally being clickable links for navigating from a ref to a corresponding note and back from the note to the ref. The links and backlinks are identified internally by combining the specified parameters. The templates take a variable number of unnamed parameters identified by their position and, optionally, a named parameter named noid which, if used, should be set by specifying it as "noid=noid".

Very simple example
{| class=wikitable !Article !Wikitext Text that requires a footnote.

Labels must be unique
A common error when using ref is to use it multiple times with the same label. For example:

Text that requires a footnote. Some other text that requires the same footnote.

Examples
Example:  Article text more text more text.
 * Bulleted text
 * Bulleted text.
 * intervening text
 * Text for note a.
 * Text for note b.
 * Text for note a.
 * Text for note b.

This would produce: Article text more text more text.
 * Bulleted text
 * Bulleted text.
 * intervening text
 * Text for note a.
 * Text for note b.
 * Text for note a.
 * Text for note b.

Notice that the navigation back from the note to the ref does not work by clicking the backlink for refs which specify "noid=noid". In practice, if "noid=noid" is specified, it is usually specified for all refs having identical unnamed parameters, and navigation back to the associated ref is done by using the browser's "Back" button.

Also notice that browsers which support highlighting of link-accessed material highlight the active backlink by default, and that the highlighting has been extended to encompass the text for note c by specifying that text as a final template parameter instead of placing it outside of the template.

Table footnotes
One common application for ref and note templates is in placing footnotes below tables, as in the following example:


 * Components may not sum to totals due to rounding
 * includes energy and construction
 * includes financial intermediation services indirectly measured

Alternative referencing style
Using ref/note tags is not the only way to do footnotes. Some people prefer to use Cite.php. Cite.php has many advantages, but is not mandatory.