I'm using Notepad++ to format my first novel in HTML before converting it to MOBI and/or ePUB.
I've done the code to make the items on my Table of Contents into live links and they all take me to the in-book headings, both in the default viewer (Chrome) and in the Kindle Previewer. Yay! But I'd like to go one step further and enable a return link, so that the reader can click on the chapter or section head and go back to the TOC.
Here's my test code from the TOC:
<p class="small">
<a href="#authornote" id="authornoter">Author’s Note</a>
</p>
and from the linked heading itself:
<h3 a href="#authornoter" id="authornote">
<p class="centeredhead">AUTHOR’S NOTE</p>
</a></h3>
It works from the TOC to the heading, but not back again.
I imagine it has something to do with the order I've arranged things. But when I reorder them I lose the formatting (font family, size, alignment) included in the "centeredhead" tag.
Is what I want even possible? If so, how?
(BTW, I'd be willing to compromise and have all the return links point back to the heading of the Table of Contents. Just as long as they return.)
EDIT-- I redid it like this, and now it works:
<pre>
<p class="small">
<a href="#authornote">
Author’s Note
</a>
</p>
</pre>
With the target and backlink like this. All it needed was for me to close the > on the h3, and start a new one for the a href.
<pre>
<h3>
<a href="#TOC" id="authornote">
<p class="centeredhead">
AUTHOR’S NOTE
</p>
</a>
</h3>
</pre>
I'm taking it back to the TOC head, which makes more sense anyway.