I’ve got it now and I wonder if this link works in every browser. I’ve tried Mozilla 1.5a and IE 6.0 and it seems to work fine.
I realize that in the majority of cases, such links are not necessary or disturbing. But sometimes it is just nice to use a named anchor anyway.
Link to a named anchor in the same node
In a long node it might aid the reader to make chapters, or just refer to some specific part in the node.
| With links like these: |
Anchors like these can be included in the section where the link should point to: |
|
<a href=#anchorname>Text Text Text</a> <a href="#anchorname">Text Text Text</a> |
<a name=anchorname>Text text text</a> <a name="anchorname">Text text text</a> |
Link to a named anchor in another node
A lot of ways to link to a named anchor in another node do not work correctly, the link will be translated into a faulty URL. Some examples that do not work:
[nodename#anchorname|Text text text]
[id://954#anchorname|Text text text]
<a href="nodename#anchorname">Text text text</a>
<a href=nodename#anchorname>Text text text</a>
The solution of a link with a named anchor seems not to be possible with square brackets […]. The only way seems to be to use the “real HTML” <a href=…> with the full path from the root.
These examples work fine:
<a href="/index.pl?node=954#regexdata">Regular Expressions</a>
<a href=/index.pl?node=954#regexdata>Regular Expressions</a>
Are there easier and/or more elegant ways to do this? Am I missing something?
In reply to Named anchors in current node or in another node by woolfy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |