This page explains how to create the Footnotes section for Wikipedia articles. In this context, the word "Footnotes" refers to the Wikipedia-specific manner of documenting an article's sources and providing tangential information, and should not be confused with the general concept of footnotes. This how-to does not cover the formatting of citations within the Footnotes section, which is reviewed in Citing sources.

Footnotes are created using the Cite software extension. This extension adds the HTML-like elements <ref>...</ref>, <references /> and <references>...</references>. The elements are also used in a number of templates; for example, it is becoming more common to use {{reflist}} rather than <references /> as it can style the reference list.

Overview

Instructions on this page may not work with VisualEditor. If you have opted in, you can use either VisualEditor or classic editing through wiki markup (wikitext) to edit most pages. The directions on this page, especially about what codes to type to produce formatting effects, are predominantly geared toward wikitext editing. For instructions on editing with VisualEditor, see Wikipedia:VisualEditor/User guide.

The Footnotes system shows two elements on the page:

A Footnote marker is displayed in the article's content as a bracketed, superscripted number, letter, or word. Examples shown respectively are: [1][a][Note 1]. This footnote label is linked to the full footnote. Clicking on the footnote marker jumps the page down to the footnote and highlights the citation. If you are using the desktop site and have Javascript enabled, then hovering your cursor over a footnote marker (or touching it on touch devices) will show a pop-up box containing the footnote.

A Footnote displays the full citation for the source. Together the footnotes are displayed in an ordered list wherever the reference list markup {{reflist}} is placed. Each entry begins with the footnote label in plain text. The entire reference list is formatted in a slightly smaller font.

Each successive footnote label is automatically incremented. Thus the first footnote marker would be [1], the second would be [2] and so on. Custom labels are also incremented: [a][b][c], [Note 1][Note 2][Note 3].

For a single use footnote, the label is followed by a caret (^) that is a backlink to the matching footnote marker. For example:

1. ^Citation

If a named footnote is used in the text multiple times, then the footnote has multiple backlinks shown as letters:

2. ^ a b cCitation

Clicking on the backlink or pressing backspace ← returns to the footnote marker.

Footnotes in action

The superscript numeral "1" in square brackets at the end of this sentence is an example of a footnote marker.[1]

URLs must begin with a supported URI scheme. http:// and https:// will be supported by all browsers; however, ftp://, gopher://, irc://, ircs://, mailto: and news: may require a plug-in or an external application and should normally be avoided. IPv6 host-names are currently not supported.

If URLs in citation template parameters contain certain characters, then they will not display and link correctly. Those characters need to be percent-encoded. For example, a space must be replaced by %20. To encode the URL, replace the following characters with:

sp

"

'

<

>

[

]

{

|

}

%20

%22

%27

%3c

%3e

%5b

%5d

%7b

%7c

%7d

Single apostrophes do not need to be encoded; however, unencoded multiples will be parsed as italic or bold markup. Single curly closing braces also do not need to be encoded; however, an unencoded pair will be parsed as the double closing braces for the template transclusion.

Reference lists: the basics

Once any number of footnotes have been inserted into the content, the reference list must be generated. For the basic reference list, add {{reflist}} wherever the list is desired. Once the page is published and viewed, the footnotes will be automatically generated and numbered and the reference list will be generated. The main reference list is placed in a separate section, usually titled "References", "Notes" or the like.

In some cases, a page has more than one reference list. Until 2014, multiple uses of {{reflist}} on the same page required use of a |close= parameter; that bug has been fixed and the|close= parameter may safely be removed.

When editing, <references /> may be seen instead of {{reflist}}. This is valid, but <references /> does not offer the advanced features of {{reflist}}.

Footnotes: using a source more than once

You can cite the same source more than once on a page by using named footnotes. The syntax to define a named footnote is:

<ref name="name">content</ref>

To invoke the named footnote:

<ref name="name" />

Names for footnotes and groups must follow these rules:

Names are case-sensitive.

Names must not be purely numeric; they should have semantic value so that they can be more easily distinguished from each other by human editors.

Names must be unique—you may not use the same name to define different groups or footnotes.

Please consider keeping reference names simple and restricted to the standard English alphabet and numerals. Failing that, including if spaces are used, the following technical restrictions become relevant:

Quotation marks are optional if the only characters used are letters A–Z, a–z, digits 0–9, and the symbols !$%&()*,-.:;<@[]^_`{|}~. That is, all printable ASCII characters except #"'/=>?\.

Inclusion of any other characters, including spaces, requires that the reference name be enclosed in quotes; for example, name="John Smith".

The quote marks must be the standard straight keyboard marks ("); curly or other quotes will be parsed as part of the reference name.

Quote-enclosed reference names may not include a less-than sign (<) or a double straight quote symbol ("). These may be escaped with &lt; and &quot;, respectively.

You may optionally provide reference names even when the reference name is not required. This makes later re-use of the sourced reference easier.

Markup

Renders as

This is page content.<ref name=manchester2002>''LibreOffice for Starters'', First Edition, Flexible Minds, Manchester, 2002, p. 18</ref> This is more content.<ref name=manchester2002 />
{{reflist}}

The actual name used can be almost anything, but it is recommended that it have a connection to the citation or note. A common practice is to use the author-year or publisher-year for the reference name. This helps editors remember the name, by associating it with the information that is visible to the reader.

Note that the footnote labels are incremented in the order they are used, and that they use the same label when reused, thus the labels can seem out of order:

By setting the width in em, the number of columns will automatically be adjusted to the width of the display.

The set columns feature is now deprecated in favor of the option described above, which is better suited to flexible formatting for a variety of display screen sizes, ranging from mobile phones and tablets to wide-screen "cinema" displays. Forcing a fixed number of columns has been disabled in mobile view.

The number of columns to use is up to the editor, but some major practices include:

List-defined references

Some or all of the footnotes can also be defined within the reference section/list, and invoked in the page content. This keeps those citations in one central location and avoids cluttering the text (and any infobox). This is purely a source code change – the actual display of the citation in the text to a reader is unaffected. For a more detailed evaluation of this method, see WP:LDRHOW. The syntax is:

The references will be numbered, and appear in the output, in the order that they are first referred to in the content, regardless of their order within the list. All references in reference list must be referenced in the content, otherwise an error message will be shown.

Note that when you use the visual editor, you will not be able to add, remove, or change list-defined references.

Footnotes: embedding references

Explanatory notes may need to be referenced. Because of limitations in the Cite software, reference tags cannot be nested; that is, a set of <ref>...</ref> tags cannot be placed inside another pair of <ref>...</ref> tags. Attempting to do so will result in a cite error.

Footnotes: groups

Sometimes it is useful to group the footnotes into separate lists, for example to separate explanatory notes from references, or to list references for tables, image captions, infoboxes and navboxes. The sequence of footnote labels is independent in each group.

The syntax to define a footnote with a group is:

<ref group=groupname>Content</ref>

The footnote marker group name must be enclosed in quotes if the group name includes a space, else a cite error will occur, otherwise quotes are optional.

This part of the text requires clarification,<ref group=note>Listed separately from the citation</ref> whereas the entire text is cited.<ref>Citation.</ref> And this needs even more clarification.<ref group=note>Another note</ref>
==Notes==
{{reflist|group=note}}
==References==
{{reflist}}

This part of the text requires clarification,[note 1] whereas the entire text is cited.[1] And this needs even more clarification.[note 2]

There are several predefined groups that can have a reference list styled so that the label (a superscripted character within square brackets, e.g., [1]) of a note or citation (aka footnote, reference) matches and links to the note marker label located in the main text and the label in front of the note's text in the appropriate group's list. There can be more than one of these groups' lists in the Notes, References and other similarly purposed sections.

These predefined note and citation groups have templates that make the wikitext markup simpler. These templates also allow a standard reference to be inserted, so that an explanatory note can have a reference, or citations can be nested.

Note: If the note's text has a reference name that is used more than once, the labels will still match, but the clickable alpha characters that toggle the note's display will be next to the note's label, with links to the multiple locations of its marker in the main text. See WP:REFNAME and the first point below in § Issues.

Reference lists: automatically generated

A page with <ref> tags but no reference list markup used to display an error, except on talk and user pages. In recent versions of Wikipedia, the error no longer appears; instead an automatically generated reference list (AGRL) is displayed at the bottom of the page.

Compared to the reference lists on properly formatted pages, an AGRL can be confusing to both readers and editors. But it is easily corrected by adding reference list markup such as the following. Add it at the position where the reference list would normally appear.

==References==
{{reflist}}

On talk pages, the {{reflist-talk}} template can be used to add a reference list to a specific discussion.

Footnotes: page numbers

Suppose you would like to cite one book, but different facts appear on different pages. You would like to cite the book again and again, but point each fact to the proper page. Suppose one fact is on page 8, a different fact on page 12, a third fact on page 18, a fourth fact on page 241. You could put a line in the "pages" parameter saying "see pages 8, 12, 18, 241" but a fact-checker might have to check all of them before figuring out the right one. Or, you could duplicate the entire citation for the book in each instance, but that would be redundant. One common approach is to use shortened citations, which requires the use of a References section following the footnotes section. A less common approach is to attach a {{rp|8}} right after the footnote marker and replace the "8" with the appropriate page number.

For example:

Markup

Renders as

Schudson said the Constitution shaped citizenship in fundamental ways.<ref name="Schudson">{{Cite book
| last = Schudson
| first = Michael
| title = The Good Citizen: A Brief History of American Civic Life
| publisher = Simon & Schuster
| date = 1998
| url = https://books.google.com/books?id=aawMAQAAMAAJ
| isbn =0-684-82729-8 }}</ref>{{rp|8}} But elections in early American politics did not generate much interest<ref name="Schudson"/>{{rp|12}} while "open discussion of differences" was generally avoided.<ref name="Schudson"/>{{rp|18}} Citizenship later shifted to a polity of essentially "self-absorbed citizens", according to his analysis.<ref name="Schudson"/>{{rp|241}}

Schudson said the Constitution shaped citizenship in fundamental ways.[1]:8 But elections in early American politics did not generate much interest[1]:12 while "open discussion of differences" was generally avoided.[1]:18 Citizenship later shifted to a polity of essentially "self-absorbed citizens", according to his analysis.[1]:241

{{r}} compactly combines the functions of <ref> and {{rp}}: {{r|Schudson}} is equivalent to <ref name="Schudson"/> and {{r|Schudson|p=241}} is equivalent to <ref name="Schudson"/>{{rp|241}}.

Previewing edits

When you edit a single section of a page, the footnotes list will be visible when you preview your edits under the heading "Preview of references", although you will still not be able to see named references whose definition is outside the section you are editing.

RefToolbar

Using the citation toolbar to insert additional references to the first source.

You can use the citation toolbar to name references. When you first create a reference, you can enter a value in the "Ref name" box. When you want to reuse this reference, click the "Named references" button on the citation toolbar and choose which reference you would like to insert.

The template {{Unreferenced}} should be added to articles with no references at all. For biographies of living persons, use {{BLP unsourced}} instead.

The template {{Unreferenced section}} is for individual sections that have no citations in articles that have at least one citation somewhere else. For biographies of living persons, use {{BLP unsourced section}} instead.