This is a documentation subpage for Template:Anchor.
It contains usage information, categories, and other content that is not part of the original template page.

This template manually adds an HTML anchor to a page at the location of its invocation.

Keep in mind that anchors are inserted by default at all the headings in a page. So this template is only useful if you either:

  1. Want an anchor with a different name than a header. Useful for shortcuts.
  2. Want an anchor at some place other than a header.

The template should always be substituted when it is used inside a heading, otherwise it will display in the edit summary every time that section is edited.

Usage

{{anchor|foo}}

For use inside section headings:

==Example heading {{subst:anchor|foo}}==
which will result in
==Example heading <span class="anchor" id="foo"></span>==

See also

Template data

Show/hide template's data

The following information is used by extensions and applications, such as VisualEditor, to help users implement this template onto pages. Please ensure that it is up-to-date.

Adds an HTML anchor to the page.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Anchor1 anchor

Anchor name.

Stringrequired