06-12-2020, 06:28 AM | #16 | |
Resident Curmudgeon
Posts: 74,037
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
06-12-2020, 06:48 AM | #17 |
Evangelist
Posts: 482
Karma: 2267928
Join Date: Nov 2015
Device: none
|
You don't use the heading textual content for ToC, as they differ. There is a weird solution of creating an empty h# element, and assigning its title attribute to the manually created text.
|
Advert | |
|
06-12-2020, 07:48 AM | #18 |
Resident Curmudgeon
Posts: 74,037
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
06-12-2020, 08:59 AM | #19 | ||
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Quote:
Oh, yeah, that's a great solution. /sarcasm. Hitch |
||
06-12-2020, 09:06 AM | #20 | |
Resident Curmudgeon
Posts: 74,037
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
As for <div> where <p> should be, I find that very sloppy and that does get fixed. There's a lot of things that could be done, but a lot of it is sloppy have violates the keep it simple rule. When I fix up a sloppy ePub, it's a lot neater. It may not be perfect as there could be excess lines in the CSS and I don't change <p> in chapter headers for h?, but when I am done, the code can be much neater. The other thing I find atrocious is when there are hundreds of extra classes that never get used in the CSS/HTML. |
|
Advert | |
|
06-12-2020, 09:22 AM | #21 |
Evangelist
Posts: 482
Karma: 2267928
Join Date: Nov 2015
Device: none
|
In books, headings are not hierarchical. Everything over the chapter layer is usually something manually created and fancy, like a picture.
The chapter headers are usually going like that: ONE [some fancy graphics] It Begins while in the ToC something like that is put: Chapter one. It Begins HTML hierarchic headers are useless here. |
06-12-2020, 10:12 AM | #22 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
I mean, really--for those who have visual difficulties, why is it such skin off of anyone's nose, to use p for paragraphs (shocking idea, I know) and headings for, well, headings? How can one possibly be so much simpler than another, or is this just one of those "I feel like I should be arbitrary for the bloody sake of it" things? Gonna "stick it to the man," by using divs for ps and ps for headings??????? I mean, WHY? Hitch |
|
06-12-2020, 10:42 AM | #23 | |
Enthusiast
Posts: 43
Karma: 100000
Join Date: Jun 2018
Device: none
|
Quote:
Now I know better, but still, I get why it happens. |
|
06-12-2020, 10:46 AM | #24 | |
Enthusiast
Posts: 43
Karma: 100000
Join Date: Jun 2018
Device: none
|
Quote:
Essays, academic text books, anthologies, biographies, cookbooks, journalistic investigations… they usually have complex structures, with parts, chapters, and sub-parts within the chapters, detailed bibliographies. And much more. |
|
06-12-2020, 10:57 AM | #25 |
Guru
Posts: 732
Karma: 7025494
Join Date: Aug 2017
Location: Italy
Device: Kindle Paperwhite, Kobo Elipsa, Pocketbook Color PB633, Inkpad Color
|
I know a bit (just a bit) of Latex and I can easily understand that the h1 h2 ecc hierarchy is like the Latex hierarchy \part, \chapter, \section ecc. In the case of Latex the hierarchy is more explicitly semantic but the principle is the same. And also in Latex You could invent something else to obtain the same results, but why do it? (and nobody does it).
If You are coding a book for Yourself do what You want, everything works on Your ereader or Your app is good. If You are coding a book in order to sell it on the various book stores, or freely distribute it to other person: please follow the advice of Hitch and other members here: h for headings (also in fiction book) and p for paragraphs. |
06-12-2020, 11:14 AM | #26 |
Bibliophagist
Posts: 35,498
Karma: 145557716
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Not necessarily sloppy code. I used a non-displaying h with title when the book is using a graphic for the displayed title.
As for using h elements for a hierarchical TOC? One omnibus I recently read used h1 for the books, h2 for the parts within the books, h3 for chapters and h4 for sub-chapters. Made for an easy to follow TOC with no extra work required. |
06-12-2020, 11:18 AM | #27 |
A Hairy Wizard
Posts: 3,099
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
It is certainly doable to use any tag in place of the proper tag...you can make anything look/behave like anything else just by adding the right css. But it messes up other aspects (such as the accessibility functions) when publishers don't stick with the semantically correct tags.
Different agencies work on their favorite aspect of e-publishing and they rely on the content providers to follow standards so that everyone's product plays well with everyone else's. <h> for header <p> for paragraph <strong> for bold letters or special audio emphasis... <b> for visual representation only when you don't care about accessibility <em> for italicized letters or different audio emphasis... <i> for visual representation only when you don't care about accessibility <div> for a simple division of the text which can be used to define special styling in all manner of ways <blockquote> for a literal representation of a long quote - not to be confused with a div even though the same visual styling can be achieved with css, audio play back would sound different with a blockquote vs. a div |
06-12-2020, 11:49 AM | #28 | |
Resident Curmudgeon
Posts: 74,037
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
06-12-2020, 11:53 AM | #29 | |
Resident Curmudgeon
Posts: 74,037
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
06-12-2020, 11:56 AM | #30 | |
A Hairy Wizard
Posts: 3,099
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
eg. Code:
<h2 title="Copyright" style="display:none" /> |
|
Tags |
semantic markup |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Span Span Span Sigil cleaning up indesign | blackest | Sigil | 31 | 12-06-2017 10:16 AM |
Span Span Span Span | MULTIVAC | ePub | 7 | 12-06-2014 08:58 AM |
Nested Span? | Turtle91 | ePub | 4 | 05-20-2013 02:47 PM |
span in span: is this problematic? | tbuyus | ePub | 8 | 03-31-2013 08:01 AM |
Remove <br /> together with span, and only span | Razzia | Recipes | 3 | 05-30-2011 06:55 PM |