Template:Anchor

From 2009.igem.org

Revision as of 12:23, 21 April 2009 by Jaspervdg (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This template manually adds an HTML anchor to a page at the location of its invocation. This anchor can then be used to create a link to a specific part of a page.

Usage:

{{anchor|foo}}

The link can then be made as:

[[#foo|My favourite part of this page]]

When using this with a section (to make an anchor that does not change with subsequent section renamings) it is a good idea to prepend the anchor to the title, this will make the browser open with the section title at the top of the window. For example:

=={{anchor|UnchangingAnchor}} Changing Title==