Wikipedia talk:Linking to Wikipedia

Latest comment: 4 months ago by Jim Grisham in topic Sections with the same title
WikiProject iconWikipedia Help Start‑class High‑importance
WikiProject iconThis page is within the scope of the Wikipedia Help Project, a collaborative effort to improve Wikipedia's help documentation for readers and contributors. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks. To browse help related resources see the Help Menu or Help Directory. Or ask for help on your talk page and a volunteer will visit you there.
StartThis page does not require a rating on the project's quality scale.
HighThis page has been rated as High-importance on the project's importance scale.

Sections with the same title edit

How do you link to a section, when there are several with the same name. For example, in this article Heavy metal music before 1970 there are several sections called "1969", but if I use the name of the articol + # + 1969, it links me to the first 1969 section, what should I do if I want to go to the second, or the third? 12qwas (talk) 08:02, 21 April 2018 (UTC)Reply

@12qwas: Append a "_1" or a "_2" etc to the URL. For example, to link to the second section "1969", you would write http://en.wikipedia.org/wiki/Heavy metal music before 1970#1969_1.  Nixinova  T  C  03:58, 27 May 2018 (UTC)Reply
Editing the target page (in this case, Heavy metal music before 1970) to add one or more {{anchor}} templates is another option.
  • As a bonus, this will make the incoming links more resilient.
    • Why? If someone has linked to the second section by appending "_2" to the URL and then the section order is changed in the future, the link may now point to an unintended section.
Jim Grisham (talk) 20:29, 2 January 2024 (UTC)Reply

Can make a link to PART of a section? edit

Is it possible to make a link to a part of a section, so clicking on that link takes user to that part rather than just to the top of the section? For example, a link in the article internal_capsule for inferomedial takes user to the top of the section relating to the terms medial and lateral, but the definition for inferomedial is nearer the bottom of that section. Is there any way to make link go directly to the actual term inferomedial in that section? I suspect there is not, but it could be useful if there were. UnderEducatedGeezer (talk) 01:26, 7 September 2019 (UTC)Reply

Yes, it's easy. Simply use Template:Anchor, placing it wherever in the article you want to link. In this case, you could place something like {{anchor|inferomedial}} near the bottom of the section you mentioned. Then link to it using Anatomical terms of location#inferomedial. Bmf 051 (talk) 20:06, 9 September 2019 (UTC)Reply

What if the section header contains quotes? edit

The "Brian Johnson game" is a section in https://en.m.wikipedia.org/wiki/Brian_Johnson_(catcher).

I’ve tried + # + The_”Brian_Johnson_game” but that does not work. It lands you on the page, not the section. echo7tango (talk) 04:19, 18 October 2022 (UTC)Reply

  • First, make sure you’re not using Smart quotes when they are not used in section titles or anchors. (The most reliable way to do this is to copy/paste the section title or anchor text directly from the wikitext of the target article.)
  • Additionally, the {{Section link}} and {{Anchor}} templates may be helpful (even if just for troubleshooting)
  • See Help:anchor and Help:Section for more information.
Jim Grisham (talk) 20:20, 2 January 2024 (UTC)Reply

apparently, it isnt necessary to use space replacement underscores when using interwiki links to link to article sections with spaces in their titles?? edit

i was playing around with various methods of linking to specific article sections, and i noticed that its not necessary to use underscore characters (_) instead of spaces when interwiki linking to article sections that have spaces in their titles.

this project page seems to think otherwise, but [[Kitten#External_links]] and [[Kitten#External links]] will both yield the same result.

however, this only seems to be the case for interwiki links.

when using a full url, https://en.wikipedia.org/wiki/Kitten#External_links and https://en.wikipedia.org/wiki/Kitten#External links will not yield the same results, and although the url that doesnt contain the underscore wont yield a broken link per se, it only points to the main article.

whereas the url that does contain the underscore, correctly points to the "External links" section.

im not sure if this has always been the case or if its a recent development.

if anybody has any further insight on this or perhaps knows a good reason why it might be best to avoid leaving the underscores out of interwiki links pointing to articles or article sections that have spaces in their titles, please take a moment to respond and advise me so that i might avoid running into problems in the future.

if you do reply, please ping me or whatever as well, so in case i dont remember to check back here, i get a notification next time i log in.

thank you. Snarevox (talk) 06:56, 20 April 2023 (UTC)Reply

Talk page edit

How do I link to a specific comment (not to a section) on talk page? --Dustfreeworld (talk) 03:52, 18 October 2023 (UTC)Reply