View Single Post
Old 02-04-2011, 02:57 PM   #10
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
If, by "webpage" you mean HTML file (e.g. if you've split the contents of a book into a series of HTML files, one for each chapter):

a. If both files are in the same directory, and you want a simple link from some point in section001.html to the start of section002.html:

Code:
<a href="section002.html">link text here</a>
b. If the file section002.html is in a sub-directory called subdir:

Code:
<a href="subdir/section002.html">link text here</a>
c. If the file section002.html is in a parallel directory called sisterdir:

Code:
<a href="../sisterdir/section002.html">link text here</a>
d. If you want to link to a specified point part way through file section002.html:

In file section002.html add an id attribute with a unique value (bookmark name - letters, numbers and underscore character only) to the appropriate point you want to link to - e.g. if you want to link to the H2 heading "Chapter Two":

Code:
<h2 id="chap_02">Chapter Two</h2>
Then, in file section001.html where you want to have the link, add a "#" to the filename in the link code, followed by the bookmark name you want to link to. E.g.:

Code:
<a href="section002.html#chap_02">link text here</a>
DMSmillie is offline   Reply With Quote