Use Anchors on a page

Posted by Helmut_pdorf on 28 Nov 2010 10:16, last edited by Tom Levini on 01 Jun 2017 21:38

: anchhor howto

rating: +9

Top:

This page explains how you can use "anchors" - linking inside a page.

The documentation ( this link is using an "anchor" on the documentation page!) says only following:
To place an anchor use [[# anchor-name]] syntax. To refer to an anchor (and scroll to it) use [#anchor-name text to display].

1. What are anchors?

"Anchors" are /Url - addresses "inside" a page. A good example is the real usage with ToC-entries: every "Table of Content" entry is using an (invisible) anchor by automatic numbering the headers. If you click on one of the ToC-Entries top right this ́page you will detect that:

  • the cursor jumps to the heading line referred in the ToC-entry you have clicked,
  • the page is shifted up so that the header is tried to be centered vertically on the screen,
  • on the address-bar of your browser you will see the internal addressing of the used anchor as an extension of the page-Url.

2. How are they defined?

As the documentation says:

  • To place an anchor use [[# anchor-name]]
  • example: I have inserted an anchor at the absolut beginning position of this page: [[# top]]
  • notice the anchor itself is unvisible on the page!

3. How are they adressed?

As the documentation says:
To refer to an anchor (and scroll to it) use [#anchor-name text to display].

This means you can insert anywhere one or more often an "inside Link" on your page to the wished anchor with this syntax:
[#top ==>up to top] .
If you give them a right side alignment this looks than in the usage of this:
[[>]]
[#top ==>up to top]
[[/>]]

4. What is bad with anchors?

Anchors on a page are invisible !
If you want to make them visible you have to repeat the anchors-name or a similar meaning under a highlithing formatting technic. Means you can use Bolding or sizing style formatter. like the Top at the top of this page.

5. Can anchors be linked from other pages?

Yes, the are part of the Url if you want in an "outer" link:
[*http://www.wikidot.com/doc:wiki-syntax#toc22 Anchor-documentation] is a typical usage of an anchor in an "outgoing" link using the opening of a new page…:
Anchor-documentation

6. Example of such anchor-usage:

http://community.wikidot.com/howto:site-checklist#1-site-creation leads to the first self written anchor on that page … have a look on the source how this is managed to avoid an automatic ToC and simulate it by using "anchors".


Related articles

Comments

Use an anchor with a image
enthel enthel 28 Mar 2017 19:46

I trying to use a image as anchor… How could i do it?

by enthel enthel , 28 Mar 2017 19:46
Helmut_pdorf Helmut_pdorf 29 Mar 2017 18:31

An anchor is invisible - put it before / ahead the image ( like [[# image1]] and you can hop to the image using the anchor-link [#image1 go to image1].


Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.

Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?

Last edited on 29 Mar 2017 18:32 by Helmut_pdorf
by Helmut_pdorf Helmut_pdorf , 29 Mar 2017 18:31
Gravitorvox Gravitorvox 06 Jan 2018 14:13

Is it possible to link to an anchor on another page?

by Gravitorvox Gravitorvox , 06 Jan 2018 14:13
(account deleted) 06 Jan 2018 16:48

Yes, you can construct links to other pages to include anchors. See the internal links documentation.

In addition to what's shown in the docs, you can use full URL syntax as well:

http://www.wikidot.com/doc-wiki-syntax:links#internal
or
See the [*http://www.wikidot.com/doc-wiki-syntax:links#internal internal links] documentation.
by (account deleted), 06 Jan 2018 16:48
Highlighting anchor
NewJerseyMusic NewJerseyMusic 03 May 2019 14:12

For highlighting an anchor, see

http://community.wikidot.com/forum/t-11510065/highlighted-anchor-link-text-bibliography-parameters

Solution by Ed Johnson

by NewJerseyMusic NewJerseyMusic , 03 May 2019 14:12
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.
Click here to edit contents of this page.
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.
Append content without editing the whole page source.
Check out how this page has evolved in the past.
If you want to discuss contents of this page - this is the easiest way to do it.
View and manage file attachments for this page.
A few useful tools to manage this Site.
Change the name (also URL address, possibly the category) of the page.
View wiki source for this page without editing.
View/set parent page (used for creating breadcrumbs and structured layout).
Notify administrators if there is objectionable content in this page.
Something does not work as expected? Find out what you can do.
General Wikidot.com documentation and help section.
Wikidot.com Terms of Service - what you can, what you should not etc.
Wikidot.com Privacy Policy.

AltStyle によって変換されたページ (->オリジナル) /