From Arms of God Wiki
bot: universal template Anchor |
bot: doc cleanup (escape examples, drop charinsert) |
||
| Line 3: | Line 3: | ||
<code><nowiki>{{Anchor|target-id}}</nowiki></code> | <code><nowiki>{{Anchor|target-id}}</nowiki></code> | ||
Drops an invisible anchor on the page. Link to it with <code>[[PageName#target-id]]</code>. Useful when you want to link to a spot that isn't a heading (e.g. a specific row in a table or a footnote anchor). | Drops an invisible anchor on the page. Link to it with <code><nowiki>[[PageName#target-id]]</nowiki></code>. Useful when you want to link to a spot that isn't a heading (e.g. a specific row in a table or a footnote anchor). | ||
'''Avoid duplicate IDs on the same page''' — two <code><nowiki>{{Anchor|foo}}</nowiki></code> calls produce two <code>id="foo"</code> spans, which is invalid HTML. Browsers jump to the first one and ignore the rest. If you need multiple anchors, give them distinct IDs. | '''Avoid duplicate IDs on the same page''' — two <code><nowiki>{{Anchor|foo}}</nowiki></code> calls produce two <code>id="foo"</code> spans, which is invalid HTML. Browsers jump to the first one and ignore the rest. If you need multiple anchors, give them distinct IDs. | ||
Latest revision as of 01:49, 10 June 2026
Usage
{{Anchor|target-id}}
Drops an invisible anchor on the page. Link to it with [[PageName#target-id]]. Useful when you want to link to a spot that isn't a heading (e.g. a specific row in a table or a footnote anchor).
Avoid duplicate IDs on the same page — two {{Anchor|foo}} calls produce two id="foo" spans, which is invalid HTML. Browsers jump to the first one and ignore the rest. If you need multiple anchors, give them distinct IDs.
Invisible anchor target for in-page links.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Anchor ID (no spaces; will be the URL fragment) | 1 | no description | Unknown | required |