Template:Anchor

From The World of Gotha
Jump to navigation Jump to search
Template documentation

The {{anchor}} template inserts an anchor in an article to permit linking to it from another source. It places the anchor name and display text within a <span>..</span>. Note: Each anchor name on a page should be unique.

To link to an anchor from within the same page, use [[#Anchor name|display text]]. To link to an anchor from another page, use [[Article name#Anchor name|display text]]. See Help:Link § Section linking (anchors) for more details.

Usage

Basic usage: {{anchor|1}}
All parameters: {{anchor|1|2}}

The basic usage places the anchor and displays the anchor name as text. The all parameters usage places the anchor and allows the display text to be suppressed or different.

Parameters

Parameter Description Type Status Notes
1 Anchor name String Required
2 Display text String Optional Defaults to the anchor name. Can be suppressed using a null value.

Examples

  • {{anchor|anchor name}}anchor name
  • {{anchor|anchor two|another anchor}}another anchor
  • {{anchor|anchor three|}}