Template:Anchor/doc

Revision as of 01:17, 30 November 2020 by MusikAnimal (talk | contribs) (Created page with "{{Documentation subpage}} {{lua|Module:Anchor}} The template <nowiki>{{</nowiki>[[{{ns:Template}}:{{BASEPAGENAME}}|{{lc:{{BASEPAGENAME}}}}]]<nowiki>}}</nowiki> inserts one or...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The template {{anchor}} inserts one or more invisible HTML fragment identifiers (anchor names) in a page. Those locations can then be linked to.

Examples:

  • {{anchor|Foo}} can be linked to with [[#Foo|link text]] within the same article (let's call this article "Qux"). You could also link to it from other pages as with [[Qux#Foo|link text]]
  • {{anchor|Foo|Bar|Baz}} – adds anchors for #Foo, #Bar, and #Baz. You can add any number of anchors.