Search code examples
epub

Please help me understand output from epubcheck


I am modifying an ebook I purchased. I'm getting stuck on an error that epubcheck finds. The error is:

/path/to/ebook/file.html(43,53): element "blockquote" not allowed here; expected the element end-tag, text or element "a", "abbr", "acronym", "applet", "b", "bdo", "big", "br", "cite", "code", "del", "dfn", "em", "i", "iframe", "img", "ins", "kbd", "map", "noscript", "ns:svg", "object", "q", "samp", "script", "small", "span", "strong", "sub", "sup", "tt" or "var" (with xmlns:ns="http://www.w3.org/2000/svg")

Line 43 of the file in question looks like:

<h4 class="calibre41"><blockquote class="calibre42"><span class="calibre2">SUGGESTIONS FOR GETTING THE MOST FROM YOUR STUDY OF THE SCRIPTURES AND OF THIS COMPANION VOLUME</span></blockquote></h4><div class="calibre43"> </div>

I'm getting many similar messages and I don't know what they mean. Can someone help me understand what is wrong with this line so I can fix it (and the many others)?

Thanks!


Solution

  • A <blockquote> tag is not allowed inside an <h4> tag. This rule applies to HTML in general, not just epub. Change the markup so that it's valid, either by replacing <blockquote> with one of the allowed tags, or removing it. Note: you might lose some CSS styling if you don't preserve the class attribute. You might lose it anyway if the <blockquote> tag is styled explicitly.