![]() |
#1 |
Connoisseur
![]() Posts: 75
Karma: 12
Join Date: Apr 2011
Device: ipad, kindle
|
Epubcheck error -- Epubs and the "a id" tag
Hi guys,
Does anyone know why the following markup in my input hmtl: Code:
<a id="chapter3" style="page-break-before:always;"></a> <h2>CHAPTER 3: The Villain Appears Here</h2> Code:
element "a" not allowed here; expected element "address", "blockquote", "del", "div", "dl", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "ins", "noscript", "ns:svg", "ol", "p", "pre", "script", "table" or "ul" (with xmlns:ns="http://www.w3.org/2 000/svg") My TOC which is near the beginnign of my html: Code:
<a id="TOC" style="page-break-before:always;"></a> <h3>Table Of Contents</h3> <p><br></p> <p class="toc1">1 <a href="#chapter1">The Beginning Of The Story</a></p> <p class="toc1">2 <a href="#chapter2">A Young Hero Given A Quest By Some Old Dude</a></p> <p class="toc1">4 <a href="#chapter3">The Villain Appears Here</a></p> Any help would be great ![]() Stodder Last edited by Stodder; 05-17-2012 at 02:58 AM. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,317
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You cannot have <a> as a child of <body>. Instead put the id on the <h2> tag
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Connoisseur
![]() Posts: 75
Karma: 12
Join Date: Apr 2011
Device: ipad, kindle
|
Ahh, that's a great idea!
I always thought h tags with id tags were semantically incorrect. Off to try that ![]() I know this is the calibre forum, not the kindle one, but could I ask whether doing the whole <a id=""> thing is also a bad idea in MOBI formats? I do it all the time and have never thought that it was a road to errors? Now I'm second guessing my html work that I've done for mobi formats |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,317
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
it doesn't matter in either mobi or epub. The only people it matters to are the guys that write epubcheck.
|
![]() |
![]() |
![]() |
#5 |
Connoisseur
![]() Posts: 75
Karma: 12
Join Date: Apr 2011
Device: ipad, kindle
|
Ah, well that's good to know. I guess the whole error in the first place is not really a big deal then?
But I might just do the h2 tag with id just to avoid epubcheck errors, because some retailers run epubcheck on files, right? |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,317
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
yes, putting the id on h2 is the correct way to do it.
|
![]() |
![]() |
![]() |
#7 |
Connoisseur
![]() Posts: 75
Karma: 12
Join Date: Apr 2011
Device: ipad, kindle
|
Well thanks for that, Kovid!
![]() Off to tidy my work! |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
"ELF binary type "0" not known" Error. When run Kindlegen | chovan | Amazon Kindle | 4 | 02-09-2012 11:49 AM |
epubcheck: attribute "page-map" not allowed here error message | Doitsu | ePub | 5 | 10-27-2011 08:51 PM |
Touch "Updating Reading Life" = "Network error" | m_bisson | Kobo Reader | 5 | 07-15-2011 01:05 AM |
attribute "scheme" from namespace error in epubcheck 1.0.5 | thunderune | ePub | 15 | 06-30-2011 10:57 AM |
[Error] Metadata "sequence" tag from FB2 | simonbcn | Calibre | 0 | 08-30-2009 12:20 PM |