Changes

Jump to navigation Jump to search
2,906 bytes added ,  21:07, 8 February 2022
Imported page
{{Wikipedia how-to|WP:SELFLINK}}{{Linking and page manipulation|linking and diffs}}
A '''self link''' is a [[Help:link|link]] to the page on which the link appears. A self-link to a page receives different styling to traditional links – for example as bold text in Vector – when the article is viewed ("self-link feature"). Examples (apply to Vector skin):
*<nowiki>[[Help:Self link]]</nowiki> gives [[Help:Self link]]
*<nowiki>[[Help:Self link|piped self link]]</nowiki> gives [[Help:Self link|piped self link]]
A self-link to a section does not appear as bold text. Examples:
*<nowiki>[[#Self-link to a section|Self-link to a section]]</nowiki> gives [[#Self-link to a section|Self-link to a section]] (recommended)
*<nowiki>[[Help:Self link#Self-link to a section]]</nowiki> gives [[Help:Self link#Self-link to a section]] (not recommended)

Self links are usually not recommended, except for:
* Within text that is [[WP:transclusion|transcluded]] between several pages
* [[#Self-link to a section|Self-link to a section]], without the page name

==Self-link to a section==
A link to a section of the same article, even from the same section, does not cause bold text and works as a normal link: [[Help:Self link#Self-link to a section]]. Such links should usually be written without the page name: [[#Self-link to a section]], because this method does not cause the page to reload (if the reader initially arrived at the page via a [[Wikipedia:Redirect|redirect]]) and is thus more efficient. A useful application is links from article leads or overview sections to detail sections buried deeper in the same article. An automatically generated [[WP:TOC|table of contents]] has links to sections on the page.

==Indirect self links==
An ''indirect'' self link is a link to a page that redirects back. In this case, the self-link feature does not work, even though the feature would be equally useful. This is demonstrated here:
*[[Self link]]

When the prefix for the project itself is added (interwiki link style, but again linking to the page itself) the self-link feature does work. This is demonstrated here:
*<nowiki>[[w:Help:Self link]]</nowiki> gives [[w:Help:Self link]]
*<nowiki>[[en:Help:Self link]]</nowiki> gives [[en:Help:Self link]]

==Related changes feature==
A self link for use with the [[Help:Related changes|"Related changes" feature]] only works if the link is to an existing or non-existing section. If it cannot be made useful as a link to a section, use a [[Wikipedia:Piped link|piped link]] with a blank space as label, e.g. <nowiki>[[Wikipedia:Self link#x| ]]</nowiki>, showing up as "[[Wikipedia:Self link#x| ]]".

==See also==
{{Wikipedia glossary}}
* [[Wikipedia:Navigation template|Navigation template]]
* [[Wikipedia:Manual of Style/Self-references to avoid]]
* [[Template:No selflink]] (a method to avoid the bold text on self links)

[[Category:Wikipedia link help]]
Bureaucrats, Check users, editor, emailconfirmed, Interface administrators, reviewer, smwadministrator, smwcurator, smweditor, Suppressors, Administrators
12,798

edits

Navigation menu