What is a Wiki Anchor?Edit
In short, a tag that lets you link to specific sections on a page.
They make linking to particular sections of your articles much easier.
How?Edit
You use the {{Anchor}}
template to set an anchor! (The spot on the page you'd link to make links to.)
code | result |
---|---|
{{Anchor|yourAnchorID}} | yourAnchorID |
The IDEdit
yourAnchorID
can be any word you want. That word is then assigned as an ID.
The ID is used at the end of links to your page. The example link would be this:
#yourAnchorID
The hashtag is important. That tells browsers that it is an ID.
LinksEdit
You then plop that ID on the end of a link... like this:
code | result |
---|---|
[[User:CodeGlaze/Wiki Anchor#yourAnchorID]] | User:CodeGlaze/Wiki Anchor#yourAnchorID |
Code:
[[User:CodeGlaze/Wiki Anchor#yourAnchorID]]
Result:
User:CodeGlaze/Wiki Anchor#yourAnchorID
Pretty LinksEdit
You can, of course, make pretty links as well.
code | result |
---|---|
[[User:CodeGlaze/Wiki Anchor#yourAnchorID|Pretty Link]] | Pretty Link |
Code:
[[User:CodeGlaze/Wiki Anchor#yourAnchorID|Pretty Link]]
Result:
Pretty Link