User:Degine/NeoWiki/Help:Contents/Links

{{User:Degine/NeoWiki/Template:Help This page, Help:Contents/Link explains how to make wikilinks, interwiki links, or external web links (as hyperlinks) in Wikipedia, which give readers one-click access to other Wikipedia pages, other Wikimedia projects, and external websites.
 * title=Links
 * content=

For a short list of some basic shortcuts, see Cheatsheet.

Internal link
A wikilink (or internal link) links a page to another page within English Wikipedia. Links are enclosed in doubled square brackets like this: Use a vertical bar "|" to create a link while labeling it with a different name on the original page. The first term inside the brackets is the link (the page you would be taken to), while anything you type after the vertical bar is what that link looks like on the original page. Here are some examples:
 * abc is seen as "abc" in text and links to page "abc".
 * a|b is labeled "a|b" on this page but links to page "a".
 * ab gives ab. So does a|ab : a|ab. a|bc gives a|bc, just like a|bc does.  However, all four of these examples will link to page "a".
 * ab gives ab.
 * a:b gives a:b since the colon is outside the end brackets. The same goes for NeoWiki's or e-mail.
 * ab gives ab. (Double single quotes turn on and off italics.)
 * ab gives ab.
 * a|b cd gives a|bcd.

Links with a specified label are said to be "piped" because the pipe symbol is used ("|"). For certain types of link, the label will be generated automatically if a pipe is typed, even with no label after it (meaning you don't have to type one). See Help:Pipe trick.

The link target is case-sensitive except for the first character (so atom links to "Atom" but ATom does not).

If the target of a wikilink does not exist, it is displayed in red color, and is called a "red link". If a red link is clicked, the user is taken to a blank page where it is possible to create a page using that redlinked title. While on that blank page, other red links to this (non-existent) title can be detected using the "What links here" feature.

If the target of a link is the same as the page on which it appears (a self-link), it is displayed in bold font.

Attempting to link normally to an image page will produce a different effect: this will respectively place the image on the page To override this behavior, add an initial colon ":", as in.

Interwiki links
An interwiki link links to a page on another Wikimedia project website, such as Meta or another language Wikipedia. The target site must be on the Special:Interwiki specified for the source wiki. These links have the same ... syntax as wikilinks (see above), but take a prefix ":x:" which specifies the target site.

For example, m:Help:Link links to the "Help:Link" page on Meta, while WP:Athens links to page "Athens" on WP:Wikipedia as: WP:Athens.

Interwiki links can be piped, just as with wikilinks.

Interwiki links (like external links) are displayed in a slightly paler blue than ordinary wikilinks. The WP:MediaWiki page formatting does not detect whether these target pages exist, so they are never displayed in red.

Fixing links with unsupported characters

 * The URL must start with a supported URI scheme.,   and  are always supported.  ,  ,  ,  ,   and   will create a link and an icon but require an agent registered in the browser.
 * URLs containing certain characters will display and link incorrectly unless those characters are percent-encoded. For example, a space must be replaced by.
 * Single apostrophes do not need to be encoded; but unencoded multiples will be parsed as italic or bold markup


 * The link button [[File:Vector toolbar insert link button.png]] on the enhanced editing toolbar will encode a link.
 * Titles containing certain characters will display and link incorrectly unless those characters are encoded with HTML character references.

Section linking (anchors)
To link to a section in the same page, you can use:  displayed text , and to link to a section in another page:  displayed text .

The section title in fact points to an anchor on the target page. To create an anchor for a row of a table see Help:Table. However  and   are reserved names that link to the top of a page and the table of contents, respectively.

Section links still work if the wikilink is a redirect (for example, if Danzig redirects to Gdańsk, then Danzig will link to the "History" section of the article Gdańsk). It is also possible to put section links inside redirects (these work only if JavaScript is enabled). For example, WP:Wikipedia:Section link redirects to WP:Help:Link. N

Anchor links can also be added to external URLs and to interwiki links, again using the # syntax. Note that if the page name is automatically converted, then the section link still works, but disappears from the address bar (this makes it more difficult to bookmark the section itself).

Subpage links
Except in main article namespace, where the subpage feature has been disabled, subpages are pages separated with a "/" (a slash) from their 'parent' page.

Inside a subpage hierarchy the following relative links can be used:
 * ../ links to the parent of the current subpage, e.g., on A/b it links to A, on A/b/c it links to A/b.
 * ../../ links to the grandparent of the current subpage, e.g., on A/b/c it links to A.
 * ../s links to a sibling of the current subpage, e.g., on A/b, it links to A/s.
 * ../../s links to an "uncle" of the current subpage, e.g., on A/b/c, it links to A/s.
 * /s links to a subpage, e.g. on A it is the same as A/s . Because of this, linking from a namespace where the subpage feature is enabled to a page in the main namespace with a name starting with "/", requires a workaround: put a colon before the pagename.

Linking to an anchor of an ancestor does not work. Attempting it gives a link to a page with the name consisting of the name of the ancestor followed by "/".

Relative links still work if all pages of a tree are renamed according a name change of the root, including making it a child of a new root. }}