
Hi the example links seem to lead nowhere in particular. Am I missing something or, are they effectively redundant and, if so, shall I get rid of them? You can find one at Haskell Lists and Tuples after the line "...build a couple of lists" Regards Paul

P. R. Stanley wrote:
the example links seem to lead nowhere in particular. Am I missing something or, are they effectively redundant and, if so, shall I get rid of them? You can find one at Haskell Lists and Tuples after the line "...build a couple of lists"
Ah, like the following <a name="Building_lists" id="Building_lists"></a>? Missing the href attribute, these are not links in the original sense, they act as link targets. In the graphical interface, a click on a related link <a href="#Building_lists">link text</a> will center the document text around the link target "Building_lists". Note the # character. Thus, link targets allow to jump to particular positions on a single page. Of course, links usually jump between different pages. In wikibooks, such link targets are created automatically for every section heading. I don't know whether you can profit from them. Maybe it's easier for you to read the text from the page where you can also edit the text. For example, here is the full Internet address of the edit page of "Haskell/Lists and Tuples": http://en.wikibooks.org/w/index.php?title=Haskell/Lists_and_tuples&action=edit Regards, apfelmus

On 26/02/07, apfelmus@quantentunnel.de
Ah, like the following <a name="Building_lists" id="Building_lists"></a>? Missing the href attribute, these are not links in the original sense, they act as link targets. In the graphical interface, a click on a related link <a href="#Building_lists">link text</a> will center the document text around the link target "Building_lists". Note the # character. Thus, link targets allow to jump to particular positions on a single page. Of course, links usually jump between different pages.
Just so you know, the standard way of doing this now is to attach an id="target" attribute to any element you like. That makes it easier to, say, give a target to a section header: Old: <h2><a name="foo">Foo</a></h2> New: <h2 id="foo">Foo</h2> (Of course, MediaWiki does this automatically for every header anyway.) I can't remember browser compatability off the top of my head, though. -- -David House, dmhouse@gmail.com
participants (3)
-
apfelmus@quantentunnel.de
-
David House
-
P. R. Stanley