Help:Link

This page contains technical help on making hyperlinks in wiki.gis.com, giving readers one-click access to other wiki.gis.com pages, other Wikimedia projects and external websites. For very basic information, see the Cheatsheet.

Wikilinks
A wikilink or internal link links a page to another page within English wiki.gis.com.
 * a gives a (link to a, labeled a).
 * b gives b (link to a, labeled b).
 * ab gives ab, just like ab does: ab.
 * bc gives bc, just like bc does: bc.
 * a:b gives a:b (punctuation is not appended to the link).
 * ab gives ab.
 * a b gives a b.
 * ab gives ab.
 * ab gives ab.
 * bc d gives bc d.

Links with a specified label are said to be "piped" because of the pipe symbol used ( | ). For certain types of link, the label will be generated automatically if a pipe is typed with no label after it (thus saving you typing). 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 contains a namespace prefix, then the prefix and the first character after the colon are case-insensitive (so uSeR:jimbo Wales links to User:Jimbo Wales).

If the target of a wikilink does not exist, it is displayed red, and is called a redlink. If a redlink is clicked, the user is taken to a page where it is possible to create a page under the redlinked title. Redlinks to a particular (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, as in Help:Link.

Attempting to link normally to an image page, category page or interlanguage link will produce a different effect: it will place the image on the page, add the page to the category or create an interlanguage link at the edge of 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 a or another language wiki.gis.com. The target site must be on the interwiki map specified for the source wiki. These links have the same ... syntax as wikilinks (see above), but take a prefix which specifies the target site. For example, m:Help:Link links to the "Help:Link" page on Meta. Links can be piped as with wikilinks. Remember that an interlanguage link should be preceded by a colon if it is to be displayed where it appears in the text; otherwise it will be listed at the side of the page (which is appropriate only if it is the most closely corresponding page in the other language wiki.gis.com).

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

Section linking (anchors)
To make a link to a section of a page, use the following syntax:
 * links to the section titled "B" on the current page (for example, links to the Wikilinks section on this page).
 * A links to the section titled "B" on page "A".

The section title in fact points to an anchor on the target page. It is possible to define anchors other than explicit section titles, using the HTML code, or the template   (see Anchor syntax). However  is a reserved name that links to the top of a page.

Section links still work if the wikilink is a redirect (for example, if Danzig redirects to Gdańsk, then Danzig#History will link to the "History" section of Gdańsk). It is also possible to put section links inside redirects (these work only if javascript is enabled). For example, wiki.gis.com:Section link redirects to Help:Link#Section linking (anchors). Note that an explicit section link overrides any section link in a redirect, so wiki.gis.com:Section link will go to the "Interwiki links" section of this page.

For more information, see Help:Section.

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
In a namespace in which the subpage feature is enabled (which does not include wiki.gis.com article space), 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.
 * ../s links to a sibling of the current subpage, e.g., on A/b, it links to A/s.
 * /s links to a subpage, e.g. on A it is the same as A/s.

ISBN, PMID automatic links
Links to these items are generated automatically, with no need to insert square brackets: To prevent such automatic linking, use &lt;nowiki>...&lt;/nowiki> tags around the text in question.
 * ISBN codes automatically generate links, for example: the wikitext  becomes ISBN 978-0-12-345678-9 which corresponds to Special:Booksources/9780123456789.
 * becomes PMID 12345678, which links to a reference in the medical literature at PubMed.

Changing link appearance
The ways that various links are displayed in browsers, as described above, are the default display styles in the default skin. Users can change the way they see links:
 * by selecting a different skin;
 * by applying a user style using CSS;
 * by changing the "Underline links" or "Format broken links like this" value on the Appearance tab of user preferences;
 * by setting the "threshold for stub display" on the Appearance tab of user preferences. This causes links to pages in mainspace to be displayed in a distinctive fashion – dark red by default – if the wikitext of the target page has less than a specified number of bytes. (Any section markers in the link are ignored. Links to redirects are displayed in the normal style.)

Hover boxes
In many browsers, holding the cursor over a link (mouseover) shows a hover box (tooltip) containing the text of the link's HTML title attribute. MediaWiki sets this to the target page name (without any section indication) if it's a wikilink, the page name with prefix if it's an interwiki link, and the URL if it's an external link. (This can be switched off in the user preferences.) The browser may also show similar information, including any section indication, in the address bar.

For these effects a piped link is useful even if it is not followed; for example, for displaying the meaning of an acronym. It is possible to produce a hover box without a link, using the H:title template.