Quote:
Originally Posted by JSWolf
I do what makes less code bloat. And <h1 class="chapter"> for every chapter is code bloat when I just used <h1>.
|
It's not really bloat. It's readable and because of zip tokenisation it may only add less than 16 bytes even if there are 1000s of chapters (e.g. a Bible).
However I do agree that up to a point KISS is a good principle. But I've had to maintain arcane 70s style C using compact muliple statements on one line and also C++ written as if the programmer was more at home with Modula-2 or Ada. I know which I prefer editing.
A technical document might use the same style for every h1 (and any h level will use a suitable style).
A novel might have h1, h2 or h3 for all the chapter 'titles', but due to limited levels on TOC and TOC layout might use the same level h for other headings with a different style.
On a separate issue:
Some novels don't have any chapters at all in the body, though there may be named scene breaks with a paragraph in a different style (Dune) or simply a first paragraph style. In such a case the source could have either a handmade TOC or <hx> with no text but a title attribute because a TOC/Navigation system is more needed in an ebook than a paper book.