From XHTML to HTML5

Sigh. My long-standing support for XHTML has been slowly eroding. It didn’t do much for me, and it just caused slight oddities with the browsing world. My love of the bleeding edge tends to do me in.

Now that HTML5 is being supported by W3C, I’ve abandoned my stance, and jumped in with the WHATWG.

So mterry.name now is written in HTML again.

7 thoughts on “From XHTML to HTML5”

  1. Haha! Long live the radial context menus! Welcome to Mikix’s page little guys, I’m glad you can finally see it.

  2. This is really fascinating, Mike, but where’s the dirt?
    Instead of telling us how you switched from XHTML to HTML maybe tell us about how you switched from Trojans to Lifetyles, or how Gucwa chopped his finger off in the garbage disposal.

    Nick, what up with your blog? I know it’s not for lack of interesting stuff going on. Give us something… a few sentences a month maybe?

  3. Maybe two questions.

    1) what were your initial motivations from moving to HTML 4.01 to XHTML 1.0?
    2) what is your motivation now for moving from XHTML 1.0 to HTML 4.01?

    What are the practical concerns, which makes you take the time to do the actual switch?

  4. Hi, Karl!

    1) XHTML was, at the time, ‘the way forward.’ W3C had retired HTML in favor of its XML kin. I love messing with bleeding edge tech, so I thought I’d be a guinea pig for all the new hotness.

    Things that made XHTML interesting to me:

    a) better defined error behavior (i.e. die on malformed XML)
    b) namespaces (I liked the idea of being able to embed other vocabularies like MathML and RDF)
    c) HTML cleanup (removal of presentation elements and addition of semantic ones in XHTML2)
    d) better machine readability

    2) First, note that I’m actually moving from XHTML 1.0 to HTML 5 (such as it is now). XHTML2 was neat, but so backwards-incompatible, that I was leery of switching to that. Once the W3C reopened development of HTML5 using the WHATWG as a base, I felt comfortable that HTML had a future again. And ultimately, XHTML was more trouble than it was worth for me:

    a) HTML5’s error behavior is more pragmatic and defines quirks for well-formed but non-conforming HTML
    b) HTML5 also cleans up some HTML messes and adds interesting web-appy markup like <video>
    c) I realized that machine readability is not necessarily better for XML. Sure, dumb-XML parsers can all read XML and XHTML. But HTML is so widespread that HTML-parsers are very common. And in order to make anything of the XHTML tags, the parser will often need HTML-specific knowledge anyway. I just don’t see XML parsers that don’t know about HTML becoming very common or useful.
    The rest of the world wasn’t ready for XML-wrapped HTML. I encountered numerous problems with serving XHTML as XML. I needed to use the copy.xsl trick to fool IE. This meant I was serving XHTML as application/xml, which is fine per the spec. But not everything worked right. My friends used a context radial menu for Firefox that didn’t work on my pages. Google for a long time didn’t spider my pages. It does now, but I don’t know what other spiders barf on application/xml. Some special purpose clients like lynx didn’t handle it well.

    I will miss namespaces. I don’t currently see a replacement in HTML5, and was sorry to see that the spec calls for the removal of the ‘profile’ attribute on the head element. But I don’t doubt that some semantic-web solution will appear to allow semantically marking up HTML pages.

    But I never used namespaces much anyway (only one blog post ever used MathML and that was a trivial use of it). Semantic markup is a nice bonus for me, but didn’t overcome the other concerns. If I flip flop on that in the future, I can always use RDF + XHTML5 (the confusingly-named XML-wrapped version of HTML5).

    In the end, it was very easy to switch to HTML5 from XHTML1. I really only had to replace the doctype and start serving pages as text/html again. I’ve added some minor uses of HTML5 tags (none of which are supported by any browser yet) like <header>, <footer>, and <dialog>.

    The whole switch was but a few line changes (especially since HTML5 is forgiving of backslashes in void elements).

  5. Pingback: Anonymous

Comments are closed.