Help:Link

This page explains how to make the wikilink, interwiki link, or external web link (as hyperlinks) connections on Wikipedia, which gives readers one-click access to other Wikipedia pages, other Wikimedia projects, and external websites.

Letters and other non-punctuation characters immediately after a wikilink's closing brackets—with no intervening space—become part of its displayed link text.

Less common ways in which link targets are reinterpreted are described below in #Conversion to canonical form.

These links have the same [[...]] syntax as wikilinks (see previously), but take a prefix ":x:" which specifies the target site.

Thus (incorporating the pipe trick), [[:ja:Wikilink|]] would be used to link to Wikilink on Japanese Wikipedia.

Therefore, when making an external-style link to an internal page (that is, using single square brackets, or a bare URL), https should be specified to avoid the needless redirect, as in https://en.wikipedia.org/w/index.php?title=Help:Link&action=history.

However, as all Wikimedia sites now require HTTPS, this linking style is obsolete and should no longer be used.

Links in the table of contents will automatically make this encoding, so the URL can be copied from there.

However, that URL will also encode other characters which do not interfere with templates or wikicode, so the result may look ugly.

In addition to anchors created automatically by section titles, there are times when it's advantageous to create an anchor on a smaller unit of text, such as a specific paragraph (see § Linking to part of a section below).

It is also possible for the target of a redirect to be defined as a specific section or anchor of a page (these work only if JavaScript is enabled).

This way, if the section or anchored text later becomes its own article, links via the redirect won't need to be rewritten.

Anchors can be placed anywhere, including at the start of a clause, and inside notes and citations, though it is advisable to test first in your sandbox before trying some exotic new kind of location for the first time.

Also the anchor has to be placed after any indicators that are only recognized at the start of a line (such as == or ===, etc., for new section, * for new bullet point, : for indentation), as the anchor should still work, but the start-of-line indicator usually no longer will (and you may not always notice this, perhaps especially if you are in a hurry).

There are various tricks to get the same result with less typing: An alternative to a piped link is using redirect pages.

This is convenient if the redirect is already there or will also be of use elsewhere; however, there are a few drawbacks: Combining a piped link and a redirect, one can provide some information that is not the name of the page one links to in the hover tooltip, e.g., the pipe to a redirect [[United Nations Organization|UNO]] will display a tooltip "United Nations Organization" when hovering over UNO, thereby explaining the abbreviation.

If in a piped link the part after the "|" is left empty, it is converted to an abbreviated form of the linked page, as follows: Just like for the three or four tildes when signing on Talk pages and the use of subst, in a preview, the result already shows up in the preview itself, but the conversion in the edit box is not yet shown.

Note that the top of every subpage shows the navigation links to all parent subpagenames.

In these cases, use templates or magic words, see #Links containing URL query strings.

Users can change the way they see links: A hatnote is a note that sits on top of a paragraph like a hat.

The following hatnote templates and their texts also exist: In many browsers, holding the cursor over a link (mouseover) shows a hover tooltip containing the text of the link's HTML title attribute.

The browser may also show similar information, including any section indication, in the status bar.

A link whose target contains disallowed characters (see WP:Page name) will be displayed without markup, as in [[A{b}]].

Conversions are automatically made to non-literal characters in wiki and interwiki links.

Because the ampersand character (&) is disallowed, it is not possible to create an ordinary link containing &action=edit or &redirect=no in the URL query string.

For information on how to link to pages from an image, see mw:Extension:ImageMap.

Several templates have been created to make linking easier (although they are not usually used in article space).

In link targets, spaces and underscores (which are effectively equivalent) are ignored if they come at the start, at the end, or immediately before or after the colon following a namespace prefix.

Links which resolve to invalid page titles are displayed as unmarked-up wikitext.

Titles indicated by wikilinks are displayed in canonical form (with correction of capitalization and excess spaces / underscores removed, as described previously) in the following places: The prefixes in interwiki links are treated similarly to namespace prefixes: they are insensitive to case and to spaces before and after the colon.

A video screencast showing how to create wikilinks