Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Help:Link
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== <span id=Wikilinks>Wikilinks (internal links)</span> == {{see also|Wikipedia:Manual of Style/Linking|Help:Wikitext#Wikilinks|mw:Help:Links}} {{shortcut|H:WIKILINK}} A wikilink (or internal link) is a link from one page to another page within the English Wikipedia, or, more generally, within the same Wikipedia (e.g. within the French Wikipedia), in other words: within the same domain, or, even more generally, within the same Wikimedia project (e.g. within [[Wiktionary]]). Links are enclosed in doubled square brackets: * <syntaxhighlight lang="wikitext" inline>[[1234]]</syntaxhighlight> is seen as "[[1234]]" in text and links to (the top of) page "[[1234]]". Use a [[vertical bar]] "|" (the "pipe" symbol) to create a link which appears as a term other than the name of the target page. Links of this kind are said to be "[[Help:Piped link|piped]]". The first term inside the brackets is the title of the page you would be taken to (the link target), and anything after the vertical bar is what the link looks like for the reader on the original page (the link label). For example: * <syntaxhighlight lang="wikitext" inline>[[a|b]]</syntaxhighlight> appears as "[[b]]" but links to page "[[a]]", thus: [[a|b]]. See [[Help:Pipe trick]] for how to generate some common forms of piped links without typing text after the "|". Letters and other non-punctuation characters immediately after a wikilink's closing brackets—with no intervening space—become part of its displayed link text. The target is unchanged. This is useful for plurals and verb forms which only add something at the end. For example: * <syntaxhighlight lang="wikitext" inline>[[apple]]s</syntaxhighlight> generates [[apple]]s, linking to [[apple]]. It is equivalent to <syntaxhighlight lang="wikitext" inline>[[apple|apples]]</syntaxhighlight>, but more convenient to read and edit. More complicated examples: * <syntaxhighlight lang="wikitext" inline>[[a|b]]c</syntaxhighlight> gives [[a|b]]c, equivalent to <syntaxhighlight lang="wikitext" inline>[[a|bc]]</syntaxhighlight> . * <syntaxhighlight lang="wikitext" inline>a[[b]]</syntaxhighlight> gives a[[b]]. There are no special rules for text preceding a wikilink. *If you want the "a" in front in the colour of the link, you have to write<br/><syntaxhighlight lang="wikitext" inline>[[b|ab]]</syntaxhighlight> gives [[b|ab]]. * <syntaxhighlight lang="wikitext" inline>[[a]]:b</syntaxhighlight> gives [[a]]:b since the rule doesn't apply to punctuation.<br/>This does the right thing for possessives. <syntaxhighlight lang="wikitext" inline>[[Batman]]'s</syntaxhighlight> gives [[Batman]]'s. * <syntaxhighlight lang="wikitext" inline>[[a]]''b''</syntaxhighlight> gives [[a]]''b''. This rule also applies to "invisible" notation such as double apostrophes (to turn on and off italics) * Even italics ''in'' the link: <syntaxhighlight lang="wikitext" inline>[[a|a''b'']]</syntaxhighlight> gives [[a|a''b'']], but, of course, in colour. * <syntaxhighlight lang="wikitext" inline>[[a]]<nowiki />b</syntaxhighlight> gives [[a]]<nowiki/>b. The nowiki tag turns off the rule. * <syntaxhighlight lang="wikitext" inline>[[a|b]]<nowiki />c</syntaxhighlight> gives [[a|b]]<nowiki/>c. The link target is ''case-sensitive except for the first character'' (so <syntaxhighlight lang="wikitext" inline>[[atom]]</syntaxhighlight> links to "[[Atom]]" but <syntaxhighlight lang="wikitext" inline>[[ATom]]</syntaxhighlight> does not, it links to a ''different'' page). If the target of a wikilink does not exist, it is displayed in a red color and is called a "[[Wikipedia:Red link|red link]]". Here is a [[red link example]]. To see what the tool tip tells you about a red link and what is displayed at the bottom left corner, move your mouse pointer into this 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 red linked title. While on that blank page, other red links to this (non-existent) title can be detected using the "[[Help:What links here|What links here]]" feature. If the target of a link is the same as the page on which it appears (a [[Help:Self link|self-link]]), it is displayed in bold font, as with: [[Help:Link]]. Yes, its wiki code is actually <syntaxhighlight lang="wikitext" inline>[[Help:Link]]</syntaxhighlight>. But it is not in the usual link colour and does not react like a link when clicked or when the mouse pointer passes over it. When an edit is previewed before saving, if the target of a newly made link turns out to be a [[WP:DAB|disambiguation page]], such as the [[Peacemaker]] page, the link should be changed to one of the choices on that page unless the link is purposely in a [[WP:HN|hatnote]]. If necessary, the new link can be [[WP:pipe|pipe]]d, such as in {{code|<nowiki>[[Peacemaker (character)|Peacemaker]]</nowiki>}}, which appears as [[Peacemaker (character)|Peacemaker]] and links to the article about the fictional characters. Readers should not be directed to disambiguation pages unless there is no other option but to do so. Attempting to link normally to an [[Wikipedia:Images|image]] page, [[Wikipedia:Categorization|category]] page or [[Help:Interlanguage links|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 <syntaxhighlight lang="wikitext" inline>[[:File:Mediawiki.png]]</syntaxhighlight>, <syntaxhighlight lang="wikitext" inline>[[:Category:Help]]</syntaxhighlight>, <syntaxhighlight lang="wikitext" inline>[[:fr:Help:Link]]</syntaxhighlight>. Less common ways in which link targets are reinterpreted are described below in [[#Conversion to canonical form]]. ===Inserting and deleting internal links=== * When [[Wikipedia:Edit source|editing ''source'']], links are inserted or deleted simply by adding or removing pairs of square brackets enclosing the text concerned (plus handling piped links). There are some helpful tools: * When using the [[WP:visualEditor|visual editor]], selecting some text, then clicking the link icon above the text box (two links of a chain) will allow the link to be added, offering a selection of possible matches and the ability to pipe. * When using the [[WP:WikEd|WikEd]] source editor, selectable from Preferences > Gadgets > Editing, there is a "Wiki link" button (typically the first button on the bottom row). When editing, if some text is [[Selection (user interface)|highlighted]], clicking the Wiki link button will enclose it in double brackets, i.e., Wikilink it. If, however, some text is highlighted that includes one or more internal links—in many cases just a single internal link with its delimiting brackets—they will be removed instead. For a single link without pipe, the Wiki link button will toggle between linking and unlinking.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)