Open main menu

lensowiki β

Changes

Help:Anchors

778 bytes added, 01:22, 18 May 2006
can use a div that closes itself
{{H:h|editor toc}}
<div id="what_to_link_to">It is possible to link to a specific portion of a page.</div>

==Setting anchors==
* [[Help:Section|headers]] automatically become html anchors, which can be linked to.
* The <a> tag is [[Help:HTML in wikitext|not allowed in MediaWiki]], so we can't do the <a name="link here">, but we can do the "id" html attribute to almost any existing tag. For example, <nowiki><div id="what_to_link_to">text</div></nowiki> or <nowiki><div id="what_to_link_to"/>text</nowiki>.

==Referencing anchors==
inside a regular wiki link <nowiki>[[page#anchor_name|shown_up_as]]</nowiki>, include the hash sign (#) and the header name or the id tag name as you have written it.

{{h:f|langs=|enname=Anchors}}<!--When translating leave this line intact-->
Anonymous user