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

This page explains how to make the wikilink, interwiki link, or external web link (as hyperlinks) connections on Wikipedia, which give readers one-click access to other Wikipedia pages, other Wikimedia projects, and external websites.A link has various (changeable) appearances on the "anchor" page, and the "target" page which owns the "backlinks" can count the links to it with the WP:What links here tool.For a short list of some basic shortcuts, see Wikipedia:Cheatsheet.For guidelines on how links should be used in Wikipedia, see Wikipedia:Manual of Style/Linking.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 "|" (the "pipe" symbol — see Wikipedia:Piped link for how to type one) to create a link while labelling 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: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). Other ways in which link targets are reinterpreted are described further: Conversion to canonical form.If the target of a wikilink does not exist, it is displayed in red color and is called a "red link". Here is a red link example. 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, as with: Help:Link.Attempting to link normally to an image page, category page or interlanguage link will produce a different effect: this will respectively 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, insert an initial colon ":", as in [[:File:Mediawiki.png]], [[:Category:Help]], [[:fr:Help:Link]].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 interwiki map specified for the source wiki. These links have the same [[…]] syntax as wikilinks (see previously), but take a prefix ":x:" which specifies the target site.For example, [[m:Help:Link]] links to the "Help:Link" page on Meta, while [[:commons:Athens]] links to page "Athens" on Wikimedia Commons as: commons:Athens.Interwiki links can be piped, just as with wikilinks. Remember that an interlanguage link should be preceded by a colon if it is to be displayed, where it is inserted in the text, as an inline interlanguage link; otherwise it will be displayed in the list of interlanguage links at the side of the page (which is appropriate only if it is the most closely corresponding page in the other-language Wikipedia). Thus (incorporating the pipe trick), [[:ja:Wikilink|]] would be used to link to Wikilink on Japanese Wikipedia. Example: ([[:ja:URL|]] links to URL on Japanese Wikipedia).Interwiki links (like external links) are displayed in a slightly paler blue than ordinary wikilinks. The MediaWiki page formatting does not detect whether these target pages exist, so they are never displayed in red.External links use absolute URLs to link directly to any Web page. These links have the associated CSS class "external". External links are in the form [ link name] (resulting in link name), with the link name separated from the URL by a space and followed by an external link icon. Links without link names appear numbered: [] becomes: [1]. Links with no square brackets display in their entirety: Help:URL#Linking to URLs for more detailed information.Special:LinkSearch finds all pages linking to a given site.The external link syntax can also be used to link to particular page versions within Wikipedia that are not accessible by wikilinks, such as page history, edit view, an old version of a page, the diff between two versions, etc. It can also be used to create a navigational image.To display a link without the arrow icon, place the external link syntax between <span class="plainlinks">…</span> tags.If you make frequent use of this, it is possible to accomplish it by highlighting an entry without plainlinks, and activating a Preferences → Gadgets → Editing→charinsert.For readers, it is not possible to make an external link open in a new tab / window unless they set Preferences → Gadgets → Open external links in a new tab/window.If you make an external style link to an internal page it will be https protocol. You can use a bare protocol, so that the Wikipedia:URL is //…. The following, six, different types of external links to this page all end up using On the other hand, the http link will treated like an external link, (opened in a new tab if that is your preference setting), and it will still be converted to https by the receiving internal server. Since mid 2015, you must add http: if you link to some Wikipedia:WMFLabs-related external tools such as, which is the "Show redirects only" link on all Special:WhatLinksHere reports.This is true for all pages on all Wikimedia sites. The servers only support All servers automatically add to a URL with a bare protocol, and automatically convert http in a URL to The URL returned by {{SERVER}} magic word begins with //.The word "anchor" has opposing meanings. In the context of a link from an anchor to a target, it is the starting place. In the context of the template {{anchor}}, an "anchor" is a landing place for a link to jump to.The anchor template proceeds to automatically create some invisible coding from certain text in the "landing place", taking into account certain parameters in reference templates in general. So for developers the word "anchor" may refer to the landing place in general, to the mostly invisible code, or to the text and parameters from which the code is created.To link to a section or subsection in the same page, you can use: [[#Section name|displayed text]], and to link to a section or subsection in another page: [[Page name#Section name|displayed text]]. Note that Section name is entirely case sensitive, in contrast to article links, where the first letter is not case sensitive.If more than one section on a destination page has the same title, a link to the title is to the first section with that title. If the link should be to another section with the title, append to the linked title _2, _3, and so on, without a space, counting from the top of the destination page and without regard to whether a section is a section or a subsection. For example, multiple sections titled "History" may be linked to as "History", "History_2", and so on.The section title in fact points to an anchor on the target page. It may be preferable to define anchors other than explicit section titles, using the HTML code <span id="anchor_name">…</span>, or {{Anchor|anchor name}} (see {{Anchor}} syntax).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 the article Gdańsk. It is also possible to put section links inside redirects (these work only if JavaScript is enabled). For example, Wikipedia:Section link redirects to Help:Link#Section linking (anchors) using #redirect processing. Note that an explicit section link overrides any section link in a redirect, so Wikipedia:Section link#Interwiki links will go to the "Interwiki links" section of this page.For more information, see Help:Section. See also WP:TARGET.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).Anchors can also be used to link to any part of a section. For example, if you want to link to the fifth sentence of a section, you just place an anchor at the start of that sentence, and you can then link to that anchor in the same way as you would link to any other anchor.However, you need to choose an anchor name that is unique in that page (that article or that Talk Page) and is likely to remain unique, because when several anchors on the same page have the same name, the link will only go to the first anchor. Using the date and time as part of the anchor name is a simple way to help keep it unique (for example, by naming it "ThisSection2014-09-22-18-05a1" as in {{Anchor|ThisSection2014-09-22-18-05a1}} ).Anchors can also be placed anywhere inside sentences (for example 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.There are a small number of special anchor names. See #Table row linking.To create an anchor for a row of a table see Help:Table#Section link or map link to a row anchor. However [[#top]] and [[#toc]] are reserved names that link to the top of a page and the table of contents, respectively.A piped link is an internal link or interwiki link where the link target and link label are both specified. This is needed in the case that they are not equal, while also the link label is not equal to the link target with the last word extended. This allows linking a word or phrase within the text of a page rather than using "see also", even if the wording does not exactly correspond with the name of the target page. With a suitable browser and depending on the preferences set, one can still see the link target: when you point at the link, the name shows up in a hover tooltip and is also shown in the status bar.For instance:[[coffeehouse setup|How to set up a coffee house]]
will show: How to set up a coffee houseAnother example would be [[train station|station]] rendering as station. This is useful where the word "station" is used in an article on trains; from the context, it would be clear that a train station is meant. The piped link is more convenient to the user than a link to station which might be a disambiguation page.The word piped refers to the use of the pipe character "|" used to separate the good description from the actual link. This character is named after another use of it; see Pipe (computing).An alternative to a piped link is simply using redirect pages. To create How to set up a coffee house, use [[How to set up a coffee house]] and make this a redirect to coffeehouse setup (note that, unlike previously, the tooltip that shows when you point at the link, if applicable for your browser, is simply the text already shown).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, i.e. the following 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. Press "Show changes" to see the change in the wikitext.These examples appear as:On page "A (c)", [[|b]] is automatically converted to [[b (c)|b]].Similarly, on page "A, c", [[|b]] is automatically converted to [[b, c|b]].Further examples are here.A wikilink needs a [[fullpagename]], and this is not optional except when it links to or from a subpage. A wikilink to its parent page is [[../]], and, although no page name is given, the fullpagename is rendered. A wikilink to a subpage can use the [[/subpagename]] construct, and it will render the subpagename instead of the fullpagename. Although subpages are created in article space, subpage linking does not fully function there. To link to articles that start with a "/" character use [[:/pagename]]. An initial colon is allowed (when needed) in links to, and transclusions from, article space.Subpage linking works as expected to link to any pages under a root parent page:Consider that there are about 140 subpages of the Manual of style arranged in 97 branches, 35 of which have two subpages, and 5 of which have three subpages. Subpage links save typing. Say you're editing this closely related group of fullpagenames:See how subpage links work on subpages of this page — /one/two/three/four has four subpages, and /sub/page/name1/sub/page/name2/subpage level 3 has three, but subpagenames have two slash characters in them. You'll see that top of every subpage shows the navigation links to all, parent, subpagenames. From these you can usually gauge the number of ../ constructs required. But, when a parent subpagename has a slash / character in it, [[../]] references a "subpagename" that is always a redlinked fullpagename. So from subpagename sub/page/name1/sub/page/name2, you'll need two extra constructs ../../ to get to the nearest subpagename, sub/page/name1. This happens because the true subpagename, sub/page/name2, is broken into three pseudo-subpagenames.For more information:Key words ISBN, PMID and RFC will generate internal or external links automatically:To prevent such automatic linking, use a <nowiki /> between the identifier and the value or a non breaking space.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:In many browsers, holding the cursor over a link (mouseover) shows a hover tooltip containing the text of the link's HTML title attribute. MediaWiki — the software which runs Wikipedia — 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 link address (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 status 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 tooltip without a link, using the {{H:title}} template.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. For example, "[[Help:Page%20name]]" becomes "Help:Page name". However, the opposite is true for external links; literal characters are converted into non-literal characters. For example, most browsers convert "…/wiki/!" to "…/wiki/%21".Some characters in a web address link need to be represented as escape characters because they are reserved for Wikipedia edits. Examples include %5B for [, %5D for ], %3C for <, %3E for >, %7B for {, %7D for }, and %26 for &. More can be found by reading about percent encoding. Numeric character references (e.g. [ or [) should not be used in external links because the ampersand character (&) has a special meaning in a URL.A code like %70 in a redirect disables it, although the link works from the redirect page. For a redirect that works, the redirect page shows the canonical form of the target, unlike its preview page, which renders the link in the usual way.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. These kinds of links can be helpful in user pages. Also, a redirect page can have categories and you might wish to view or edit these in a single click.The following syntax shows the use of the magic word fullurl as it would appear in a template constructed to append action=edit to the URL query string:Note that this will render as an external link rather than as an internal link and for this reason it might not appear in what-links-here queries associated with the target page.The navigable links to a page are wikilinks, redirects, and external-styled wikilinks. The {{orphan}} tag can be placed on pages with no incoming wikilinks.Each link to a page is a link to a name.[1] No one report shows all links to the content.The What links here tool, on every page, will report all wikilinks and all redirects to the content of that page. (You get the wikilinks to the redirects too.) The search parameter linksto will find wikilinks only. Both report (invisible) wikilinks placed by a transclusion through a {{template}}. The difference between them is that linksto reports a count of links to a page name, while WhatLinksHere reports a map of links to the page as content.[2]The navigable links to a section of a page are wikilinks, redirects, and URL-styled wikilinks. The difference between a redirect and a wikilink is most pronounced where a redirect targets a section, when you cannot add your own #section  to it even though it appears as [[page name]]. A wikilink that links to a section and that appears as [[page name#section name]] can link to that section through the canonical page name (the title on the page with the actual content) or or through the the page name of any redirect to it, in which case the page name is the name of a redirect page.To find wikilinks to a section requires two or more reports.The more redirects there are, the more reports there are to run. If there are no redirects involved, one report from "Links to" is enough.To report links from a page, you just list all the wikilinks on that page.One way to send a query to the API is by creating an external link (§ External links). For example, using an external link very much like a search link, you can send the API a request to list the link properties of "wp:example". It should interpret it correctly as "Wikipedia:Example", pageid 25263910.To make a page register as a link to a page, but without actually showing the link, make a link to it, but label it with a space character using the pipe trick: [[pagename| ]].For the effect that links have on date formatting, see Help:Date formatting and linking.Another link-dependent feature is related changes, which make it possible to view recent changes to all pages which are linked from the current page (or which are members of the category, if it is a category page).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). These include {{tl}} and {{tlx}} for linking to templates, and {{cl}} and {{lc}} for linking to categories. More can be found in Category:Internal link templates.As described previously, if a link target begins with a lower case letter, it will be interpreted as if it began with the equivalent capital letter. If the target contains a namespace prefix, then the whole prefix and the first character after the colon are case-insensitive (so uSeR:jimbo Wales links to User:Jimbo Wales).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. Consecutive spaces / underscores are treated as a single space. Hence _User_: Jimbo_ __ Wales__ links to User:Jimbo Wales.Also, HTML character references and percent-encoded characters are replaced with their raw character. For example, [[département]] produces département, and [[%40]] produces @. 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. However the first character after the colon is not automatically capitalized (whether it is interpreted as a capital depends on the configuration of the target wiki).