View Single Post
Old 11-18-2019, 03:22 PM   #7
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 fdwojo View Post
With respect to eBooks ONLY, what can XHTML do that HTML cannot?
XHTML can do anything HTML can.

As was stated before, it's just more strict with what's a valid/well-formed file.

Quote:
Originally Posted by fdwojo View Post
[...] it seems like nothing outside the realm of HTML seems to occur. Thus the question.
Because the books you've worked with were probably already validated, or else they wouldn't be in the stores. (Or ran through something like Calibre that would convert to XHTML.)

Or if you opened it up in Sigil, it already did the cleanup/changes for you. For example:

HTML has rules like allowing capital letters, no quotes around attributes, and no strict need for a closing tag:

HTML:

Code:
<body>
<BLOCKQUOTE>
<P>This is a paragraph</p>
<p CLASS=someclass>This is a second sentence
XHTML (and similar to what browsers automatically do in the backend when met with trash code):

Code:
<body>
<blockquote>
  <p>This is a paragraph</p>
  <p class="someclass">This is a second sentence</p>
</blockquote>
</body>
When browsers are met with junk HTML, they have to then make all these assumptions and take wild guesses at what they THINK you meant.

With XHTML, you're forced into making your code well-formed/consistent in the first place.

As I said earlier... most of the differences are technical minutiae, so no need to go too deep into it.

Last edited by Tex2002ans; 11-18-2019 at 04:15 PM.
Tex2002ans is offline   Reply With Quote