View Single Post
Old 11-13-2021, 02:30 AM   #8
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by thiago.eec View Post
For a scene break I think the correct tag would be <hr/>.
I use <div/> for separators (a line below a chapter title, for example). This is just decorative and you should not use a <hr/> tag, since it means a thematic break in HTML5.

Attachment 190182
Yes, I wrote a lot about this. See the discussion in:

especially posts #128 and beyond. Me + Hitch went breaking down pros/cons of "<hr/> as scenebreaks".

Personally, I just use simple, centered asterisks. Not relying on CSS3 or complicated overrides (these will fail across many older readers/devices).

Side Note: The one nice thing about <hr/> in HTML5 is it generates a new <section> in the Accessibility Tree. I described some of that in post #148 of that thread. This would allow a screen reader to easily jump between scenes (or sections of an article) without the need for extra markup.

Quote:
Originally Posted by kovidgoyal View Post
There is no how or why In EPUB you dont have HTMl you have XHTML which is XML. In XML *any* tag can be self closing, regardless of whether it is useful or not.
EPUB3 is HTML5... and in HTML, you can do all this really funky/obscure stuff.

Like I remember running across a Sigil "bug" with:

Code:
<p">
(It was a bad search/replace I did.)

Sigil would completely crash with Reports, Spellcheck Lists, etc., but other things like Preview worked fine...

KevinH dug into this, and turns out, it's actually "valid" (but VERY horrible) HTML5. I convinced KevinH to match Calibre's parsing of this, by changing it into an underscore:

Code:
<p_>
so at least things would still work. Then epubcheck can warn you about non-standard tags at a later date.

Note: EPUB2 is XHTML1.1, and EPUB3... many tools like Sigil/Calibre conform to XHTML5—accepting HTML5's new tags, but still enforcing XHTML's stricter rules... like always closing your tags and using quotes around your attributes.

This is just good practice, and I have no idea why you'd NOT want to use XHTML5.

Last edited by Tex2002ans; 11-13-2021 at 02:53 AM.
Tex2002ans is offline   Reply With Quote