User:CodeGlaze/Wiki Anchor

From Dungeons and Dragons Wiki
Jump to: navigation, search

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.


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 ID[edit]

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:


The hashtag is important. That tells browsers that it is an ID.


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


[[User:CodeGlaze/Wiki Anchor#yourAnchorID]]


User:CodeGlaze/Wiki Anchor#yourAnchorID

Pretty Links[edit]

You can, of course, make pretty links as well.

code result
[[User:CodeGlaze/Wiki Anchor#yourAnchorID|Pretty Link]] Pretty Link


[[User:CodeGlaze/Wiki Anchor#yourAnchorID|Pretty Link]]


Pretty Link