Community Central

As 2021 draws to a close, let's look back at a very busy year for Fandom and our wiki communities, complete with Editors of the Year! Here is This Year at Fandom!


Community Central
Documentation icon Template Documentation
[view | edit | history | purge]

This template manually adds one or more HTML anchors (i.e. link targets) to a page. This allows incoming links to target locations on the page other than section headings.


This allows links of the form [[#target]] to be used on the same page and links of the form [[Page title#target]] to be used on a different page (assuming "Page title" is the title of the page this template is used on).

The second example usage shows how multiple anchors can be provided within a single template call. It also illustrates how capitalization differences are significant in HTML anchor names; for this reason, if you suspect that incoming links will try to use targets with different capitalization (or punctuation, whitespace, etc.), then all allowed forms must be explicitly listed in the template call. Up to 10 targets can be specified in a single template call, otherwise an error message will be displayed.

The template and its documentation was merged from mw:Template:Anchor and m:Template:Anchor/doc.

The above documentation is transcluded from Template:Anchor/doc. (edit | history)
Editors can experiment in this template's sandbox and testcases pages.
Add categories and interwikis to the /doc subpage. Subpages of this template.