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.

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 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:

#yourAnchorID

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

Links[edit]

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

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