Do you encounter this ePub error in your eBook development or conversion, if so then you find the right direction, in this tutorial I’ll show you how to get rid this error and yeah this error is really time consuming it takes your time thinking and debugging.
We assume that the code below cause the ePub error.
<a id="chapter1" href="#chapter2">Go to Chapter 2</a>
We all know that the HTML code above is correct, right? But how comes that it shows this error and the ePub checker thrown in that line of code? Okay here I’ve posted some steps to follow, this might help you.
- Make sure that the anchor is point to the right direction (#chapter2).
- See if ID chapter2 is present in your xhtml file, same file where the error is.
- If step 1 and 2 does not solved your problem then try changing your html DOCTYPE, sometimes it cause an error if your DOCTYPE does not allow other HTML tag, I recommend below.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
If you encounter same error and found better solution, it is really helpful to share it below