January 6, 2026
Tight code, loose takes
How HTML changes in ePub
Your ebook is pickier than your phone—and the comments are feral
TLDR: ePub ebooks use a stricter kind of web code, so tiny mistakes can break pages on older e-readers. Comments split between cheering strict rules, wanting a reset of modern tech (plus a jab at JavaScript), and correcting the history—while the author wades in to keep the debate grounded.
ePub, the file format behind most ebooks, uses web code—but with a twist: it demands perfect grammar. The article explains that ePub relies on XHTML (a stricter version of HTML), so one sloppy tag can mean the dreaded blank page. CSS (the styling part) mostly works, but old e-readers don’t speak the latest fancy tricks. Namespaces—think extra labels for special features—add power but more rules. The community? Absolutely unhinged. One camp cheers the strictness as “good discipline,” while another rolls eyes at the fussy format and dreams of a tech do-over. Author robin_reala jumps into the thread offering answers, which only fuels the crowd’s energy.
The hottest spark: RadiozRadioz calls fragility “well-founded”, arguing web browsers should stop guessing and start failing loudly. In the opposite corner, ahmedfromtunis fantasizes about a convenient apocalypse to wipe out decades of markup—then drops the mic with “Oh, and JavaScript.” Meanwhile, tannhaeuser goes full historian, pushing back on the article’s cheeky “XML emerged from the pit” line: XML was designed for the web’s vocabularies, thank you very much. Between jokes about “blank page of doom,” gripes about ancient e-readers, and debates over how strict code should be, the comment section turned into a live courtroom for ebooks. If you make ebooks—or just hate sloppy code—this thread is your popcorn moment. Read more on the ePub standard.
Key Points
- •ePub relies on XHTML from the HTML Living Standard, requiring strictly valid XML with correct namespaces and attributes like xml:lang.
- •ePub supports embedding other XML vocabularies via namespaces, and exposes an ePub-specific namespace for added functionality.
- •CSS works in ePub but support on e-readers is limited; advanced selectors like :is() and :not() may not be reliable.
- •Progressive enhancement using @supports is recommended to handle variability in e-reader CSS support.
- •Namespace-aware CSS is necessary; developers must declare namespaces and use selectors like q[xml|lang] to target XML attributes.