Help:Anchors

From The Final Challenge Wiki
Revision as of 17:24, 10 January 2011 by Tynian (talk | contribs) (1 revision: Import helps)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:H:h

See also: Template:Ml.

Setting anchors

  • Headers automatically become HTML anchors, which can be linked to.
  • The <a> tag is not allowed in MediaWiki, so one cannot use <a name="link here">; however, one can use the "id" HTML attribute with almost any existing tag. For example, <div id="what_to_link_to">text</div>, <div id="what_to_link_to" />text or alternatively, for inline use in bulleted lists, <span id="what_to_link_to">text</span>.

Referencing anchors

Inside a regular wikilink [[page#anchor_name|shown_up_as]], include the hash sign (#) and the header name or the id tag name as it is written.

Linking to a position in an external page

The HTML source of the external target page needs to have <a name=..> or <.. id=..> at the target item, as an anchor to link to. Thus, to link to a position in an external page, for which this is not yet the case, one would need control over the target page or the cooperation of the entity that does.

Template:H:f