Template:Anchor
Documentation
This template inserts an HTML anchor in a page at its location, allowing for it to be linked to like section headings can be, using [[#Unique anchor name]]
on the same page or [[Page name#Unique anchor name]]
on a different page.
This template was copied from various Wikimedia Foundation projects, as Wikipedia itself has upgraded to a Lua-based template - one of the instances of this template said that while it could only handle 10 anchors in a single instance by defai
wherever it's placed in a page's body.
renders enclosed text in a <span id="Unique anchor name"></span>
inline, with the text inside the span also being used as the unique anchor name
. This creates an anchor that can be linked to with [[#Unique anchor name]]
on the same page or [[Page name#Unique anchor name]]
on a different page.
Usage instructions
{{anchor|Example anchor 1}}
→
{{anchor|Example anchor 2|Anchor link name example}}
→
of its usage is {{anchor|An example}}
, which turns the first two words in this sentence into an anchor that can be linked to with [[#An example]]
from this page or [[Template:Anchor#An example]]
from a different page.