Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

...and this is why I still only do XHTML strict. I mean giving up predictability and the whole world of XML tools and libraries for these "benefits"... I really don't see the point.


Giving up what now? All the tools you need for HTML5 have existed for many, many years. You'd be "giving up" your tooling in the same way you're "giving up your car" if you buy a new car. You have a new car now, what's the problem?


Sorry, but how do I use XQuery with HTML5? How do I use all my generic XML tools with HTML5? I'm sure equivalents exist, but why learn them just so I can drop a few tags? Can't even use xmlindent if I do that to prettify it. If I need to embed HTML inside an XML document it's easier if it's XHTML than HTML5. It's much more convenient for most roles if HTML fits within existing XML flows. The only benefit of HTML5 is for those manually authoring them.


You use HTML5 query selectors, not xQuery. You don't use your generic XML tools, you use generic HTML5 tools. As for "why learn them so I can drop a few tags": because you don't, you make the tooling do it for you. Because that's what tooling is for.

If you need XML: use XML tools.

If you need HTML: use HTML tools.

If you need XHTML... you're writing web content for IE, and IE is dead. XHTML died with it. Feel free to stick with what you know, but that's a pretty ridiculous argument for why you shouldn't use the thing that's used these days instead of the thing we used 15 years ago =)

(hot damn, 15 years. It's been longer than most folks realize).


Isn't this just like python code?


I'm mostly HTML5 at this point and have been for some time. The only exception I would make is things (say, Standard Ebooks) that haven't made the jump yet so their linters freak out if you don't do things exactly as they expect.

For the record, anyone who writes `<br />` as `<br>` is...misinformed.


It's not our (SE's) choice to use XHTML in ebooks, it's part of the epub spec. So we merely expect valid XHTML per the epub spec, and valid XHTML requires self-closing tags.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: