More actions
| Line 152: | Line 152: | ||
===Piped links=== | ===Piped links=== | ||
{{ | {{hatnote|See also: [[Wikipedia:Wikipedia:Piped link|Wikipedia:Piped link]]}} | ||
You may want a link to display text other than the title of the article being linked to (the "target"). This can be done with the use of the pipe character ('''|'''). For example, {{xt|<code><nowiki>[[Henry II of England|Henry II]]</nowiki></code>}} displays as {{xt|[[Henry II of England|Henry II]]}}. However, make sure that it is still clear what the link is about without having to follow the link. Think about what the reader may believe the text refers to. For example, when seeing the link {{xt|<code><nowiki>[[Archery at the 2008 Summer Olympics|Archery]]</nowiki></code>}}, which displays as {{xt|[[Archery at the 2008 Summer Olympics|Archery]]}}, the reader will probably expect this link to go to a general article on [[Archery]], rather than {{xt|[[Archery at the 2008 Summer Olympics]]}} specifically. An exception to this is when it is clear from the context that a link refers to a specific article; for instance, in {{xt|[[Template:2008 Summer Olympics calendar]]}} all links go to articles about these particular games. | You may want a link to display text other than the title of the article being linked to (the "target"). This can be done with the use of the pipe character ('''|'''). For example, {{xt|<code><nowiki>[[Henry II of England|Henry II]]</nowiki></code>}} displays as {{xt|[[Wikipedia:Henry II of England|Henry II]]}}. However, make sure that it is still clear what the link is about without having to follow the link. Think about what the reader may believe the text refers to. For example, when seeing the link {{xt|<code><nowiki>[[Archery at the 2008 Summer Olympics|Archery]]</nowiki></code>}}, which displays as {{xt|[[Wikipedia:Archery at the 2008 Summer Olympics|Archery]]}}, the reader will probably expect this link to go to a general article on [[Wikipedia:Archery|Archery]], rather than {{xt|[[Wikipedia:Archery at the 2008 Summer Olympics|Archery at the 2008 Summer Olympics]]}} specifically. An exception to this is when it is clear from the context that a link refers to a specific article; for instance, in {{xt|[[Wikipedia:Template:2008 Summer Olympics calendar]]}} all links go to articles about these particular games. | ||
*'''Plurals and other derived names.''' Plurals can be formed by appending an ''‑s'' after the closing brackets; for instance, {{xt|<code><nowiki>[[apple]]s</nowiki></code>}} displays as {{xt|[[apple]]s}}. This is both easier to type and clearer to read in the source text than the alternative {{xt|<code><nowiki>[[apple|apples]]</nowiki></code>}}. This works not just for ''‑s'', but for any words that consist of a linked term and a [[suffix]], for example ''‑ing'', ''‑ed'', or ''‑est''. However, such suffixes cannot begin with a [[hyphen]] (-), an [[apostrophe]] ('), or a [[capital letter]] (see [[Help:Link]] for more details). | *'''Plurals and other derived names.''' Plurals can be formed by appending an ''‑s'' after the closing brackets; for instance, {{xt|<code><nowiki>[[apple]]s</nowiki></code>}} displays as {{xt|[[Wikipedia:Apple|apple]]s}}. This is both easier to type and clearer to read in the source text than the alternative {{xt|<code><nowiki>[[apple|apples]]</nowiki></code>}}. This works not just for ''‑s'', but for any words that consist of a linked term and a [[Wikipedia:Suffix|suffix]], for example ''‑ing'', ''‑ed'', or ''‑est''. However, such suffixes cannot begin with a [[Wikipedia:Hyphen|hyphen]] (-), an [[Wikipedia:Apostrophe|apostrophe]] ('), or a [[Wikipedia:Capital letter|capital letter]] (see [[Wikipedia:Help:Link]] for more details). | ||
*'''Case sensitivity.''' Links are not sensitive to initial capitalization, so there is no need to use the pipe character where the case of the initial letter is the only difference between the link text and the target page (Wikipedia article titles almost always begin with a capital, whereas the linked words in context often do not). However, links are case-sensitive for all characters after the initial one. | *'''Case sensitivity.''' Links are not sensitive to initial capitalization, so there is no need to use the pipe character where the case of the initial letter is the only difference between the link text and the target page (Wikipedia article titles almost always begin with a capital, whereas the linked words in context often do not). However, links are case-sensitive for all characters after the initial one. | ||
*'''Intuitiveness.''' Keep piped links as intuitive as possible. Per the [[Wikipedia:Wikipedia:Principle of least astonishment|principle of least astonishment]], make sure that the reader knows what to expect when clicking on a link. You should plan your page structure and links so that everything appears reasonable and makes sense. If a link takes readers to somewhere other than where they thought it would, it should at least take them somewhere that makes sense. For example, do not write: <blockquote>{{!xt|Richard Feynman was also known for work in <code><nowiki>[[Parton (particle physics)|particle physics]]</nowiki></code>.}}</blockquote> Here readers would see the link displayed as {{xt|[[Wikipedia:Parton (particle physics)|particle physics]]}}, not the hidden reference to the page {{xt|[[Wikipedia:Parton (particle physics)|Parton (particle physics)]]}}, unless they clicked on the link or hovered their [[Wikipedia:Mouse cursor|mouse cursor]] over it. If a physical copy of the article were printed, the reference to the parton model would be lost. Such links are sometimes called "[[Wikipedia:Easter egg (media)|Easter egg]]" or "submarine" links. Instead, refer to the separate article with an explicit ''see also X'', or by rephrasing the sentence, as in: <blockquote>{{xt|Richard Feynman was also known for work in <code><nowiki>[[particle physics]]</nowiki></code>, especially the <code><nowiki>[[Parton (particle physics)|parton]]</nowiki></code> model.}}</blockquote> | |||
*'''Intuitiveness.''' Keep piped links as intuitive as possible. Per the [[Wikipedia:Principle of least astonishment|principle of least astonishment]], make sure that the reader knows what to expect when clicking on a link. You should plan your page structure and links so that everything appears reasonable and makes sense. If a link takes readers to somewhere other than where they thought it would, it should at least take them somewhere that makes sense. For example, do not write: <blockquote>{{! | ** Do not place a link to a name within another name. For example, use {{xt|[[Wikipedia:Columbus Avenue|Columbus Avenue]]}}, not {{xt|[[Wikipedia:Christopher Columbus|Columbus]] Avenue}}; {{xt|[[Wikipedia:Feynman diagram|Feynman diagram]]}}, not {{xt|[[Wikipedia:Richard Feynman|Feynman]] diagram}}. This applies regardless of whether linking to the full name creates a [[Wikipedia:WP:REDLINK|red link]]; for example, even if there is no article titled {{xt|[[Wikipedia:Lafayette Avenue (Brooklyn)|Lafayette Avenue (Brooklyn)]]}}, do not use {{xt|[[Wikipedia:Gilbert du Motier, Marquis de Lafayette|Lafayette]] Avenue}}. | ||
** Do not place a link to a name within another name. For example, use {{xt|[[Columbus Avenue]]}}, not {{xt|[[Christopher Columbus|Columbus]] Avenue}}; {{xt|[[Feynman diagram]]}}, not {{xt|[[Richard Feynman|Feynman]] diagram}}. This applies regardless of whether linking to the full name creates a [[WP:REDLINK|red link]]; for example, even if there is no article titled {{xt|[[Lafayette Avenue (Brooklyn)]]}}, do not use {{xt|[[Gilbert du Motier, Marquis de Lafayette|Lafayette]] Avenue}}. | |||
*'''Piping and redirects.''' As per {{section link||Link specificity}} above, do not use a piped link where it is possible to use a redirected term that fits well within the scope of the text. For example, let's assume that the page {{xt|[[Wikipedia:Papageno|Papageno]]}} is a redirect to the article about Mozart's opera ''[[Wikipedia:The Magic Flute|The Magic Flute]]''. While editing some other article, you might want to link the term {{xt|Papageno}}; here, you might be tempted to avoid the redirect by using a pipe within the link, as in {{!xt|<code><nowiki>[[Wikipedia:The Magic Flute|Papageno]]</nowiki></code>}}. Instead, write simply {{xt|<code><nowiki>[[Papageno]]</nowiki></code>}} and let the system handle the rest. This has two advantages: first, if an article is written later about the more specific subject (in this case, "Papageno"), fewer links will need to be changed to accommodate the new article; second, it indicates that the article is [[Wikipedia:WP:Most wanted articles|wanted]]. | |||
*'''Piping and redirects.''' As per | |||
===={{anchor|Linking to sections of articles}}Piped links and redirects to sections of articles==== | ===={{anchor|Linking to sections of articles}}Piped links and redirects to sections of articles==== | ||