6

I want to better understand what options the .epub format have to provide more dynamic experiences than just reading a text linearly.

Is there a way to have links inside an ePub that point to another location in that ePub?

2 Answers 2

5

Yes, you can do that, .epub books are basically made of HTML and CSS, so if you have knowledge of these languages, in theory you can manually build an .epub from scratch (but the norm is to use specific GUI editors, that help you with this and many other tasks).

Anyway, like I said, it is just HTML, so you just need to set ID's and anchors:

Example

First, create a bookmark with the id attribute:

<h2 id="C4">Chapter 4</h2>

Then, add a link to the bookmark ("Jump to Chapter 4"), from within the same page:

<a href="#C4">Jump to Chapter 4</a>

Or, add a link to the bookmark ("Jump to Chapter 4"), from another page:

<a href="html_demo.html#C4">Jump to Chapter 4</a>

Source: HTML Links from W3 Schools

0

Absolutely. Use that capability all you want.

I assume you know how to refer to other html files (and use anchors, etc).

One hard part is that we don't really have any conventions in ebooks to distinguish between external links and internal links. You can invent your own.

I have used internal links for various purposes in my ebook. I wanted to indicate my belief that links should be used sparingly within the context of an ebook. They can be distracting, and reading systems don't offer cues about where the link is going.

More humorously, whenever a book I publish includes a preface, I always include this as the first sentence:

(Or: Skip this preface to read the first story.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.