Help:Cite messages

The Wikipedia footnotes system uses the Cite.php software extension to generate references. MediaWiki messages are then used to format the display of the inline links and the references.

Elements

 * Inline link: the link shown by the content enclosed in ; shown in superscript and enclosed in brackets; coded in the MediaWiki message as $2
 * Backlink: the link shown in the references section; a single link is shown as a caret; coded as $2
 * Backlink label: multiple backlinks are shown as a caret followed alpha character labels
 * ID: a unique HTML ID that does not show; coded as $1
 * Reference content: the content enclosed in  that shows in the reference list; coded as $3

Classes and CSS
Class .reference formats the inline link; defined in Common.css

Class .references formats the reference list; defined in Common.css When the inline cite link is clicked, the focus jumps to the proper cite in the reference list. The following rules highlight the cite in light blue. This is supported by Gecko (FireFox) and Webkit (Safari, Chrome) browsers; it is not supported by current versions of Trident, but does work in the Internet Explore 9 platform preview.

Although not specific to references, Common.css does have this line height rule to keep line spacing from breaking on subscript and superscript, as used in the inline link. Internet Explorer 7 has problems with  when printing, so it is disabled for IE7 through Common.js.

Cite errors are classed with: 

The extension uses some modules for CSS:
 * ext.cite.css: CSS
 * ext.cite.js: add accessibility attributes to the citation links
 * ext.rtlcite.css: isolation to fix references in case of RTL words at the end of a reference

Reference links
The inline reference links are defined in MediaWiki:Cite reference link. The default is:

Where:
 * $1 ref ID: Cite reference link prefix + reference name + numeric starting with 0
 * $2 backlink ID
 * $3 count to display

The English Wikipedia customizes this to:

Where the brackets that show enclosing the reference count are enclosed in tags so they can be styled.

Backlink labels
The backlink label type is defined in MediaWiki:Cite references link many format. This interface page defaults to: Where:
 * $1 ref ID
 * $2 numeric value to use as a backlink:
 * $3 custom value to use as a backlink as defined in MediaWiki:Cite references link many format backlink labels:

The English Wikipedia interface page is set to:

Changing  to   changes the backlinks from numeric to alpha. This was modified in 2006 to match the output of ref which was the predominant method of inserting footnotes at the time.

Markup
This is the markup for some simple references

Which shows as

Unnamed

Named

Named reference used again

If citation templates are used, they will inject other classes and ids into the HTML output.