Anne van Kesteren

The X-factor

I was planning to write something for A List Apart called "The X-factor", actually, I already made a draft of a couple of paragraphs one citation and 5 references. But I'm not sure if I should continue. Besides that the article might not be published, of course.

Today, Ben posted a phrase in an IRC channel that made me remember my draft:

To X or not to X, that's the question.

Maybe you have read web development mistakes already. The answer is given in comment 30, made by Randy Charles Morin:

You forgot, using non well formed XHTML. This is the most irritating mistake on the Web. I mean, why use XHTML instead of HTML if it's not well-formed?

Excellent question (and answer). Are you well-formed?

Comments

  1. Yes, I believe I am. am I?

    Posted by Hayo at

  2. I'm not, but my markup is. That is, as far as I know.

    Posted by J. King at

  3. As long as no one is visitng my Guestbook my page is wellformed;) I know, I'm lazy

    Posted by Christoph Wagner at

  4. Actually, I did not post that phrase today, but last week. But nevermind…

    I do my best to have any new project (such as my current blog) to be well-formed and all that. But it's not something that works out of the box. You know one of my pet slogans recently is that we need Tools That Just Work™, that we can rely on to produce well-formed XML and with a default "validate before saving" with the DTD of our choice.

    We currently have some tools that are a step in the right direction, but we're still not there. And until we are, using XHTML as it should be done will not spread beyond a few geek blogs. For real world implementation we should really ask ourselves: Why go X? I see more problems than benefits, at this point in time.

    Posted by Ben at

  5. I'll not have my rant on why XHTML over HTML done before I go on vacation, but remind me of it the moment I return to the NL and get back online. I'll write it out, then. :)

    Posted by Faruk Ates at

  6. That Randy Charles Morin quote is awesome. I couldn't have said it better myself. I've been aggrevated a lot by code with an XHTML DTD and either not closing empty tags or bad nesting all over the place. I'm like, what's the point? If you don't want to code XHTML, then don't. It's simple.

    I realize I'm preaching to the choir here, but it felt like a place to give a mini-rant where others would understand. I think some of us need a quality-coding support group LOL

    On a related note... I've shown Fast and Easy XHTML to people who only knew basic HTML and they were easily able to get the hang of good XHTML without a problem. Which makes me wonder why anyone ever makes a fuss that it's too hard.

    Posted by Devon at

  7. I am well-formed. I am invalid where Herr Validator says I am valid, and I am valid where Herr Validator says I am invalid. Otherwise, in one instance I am purposefully invalid and Herr Validator agrees with me.

    Heinrich von Möösendorf

    Posted by Moose at

  8. You have a strange clock here, Anne. It differs from that of my watch, and from my computer's by 10-11 minutes.

    M.

    Posted by Moose at

  9. Which makes me wonder why anyone ever makes a fuss that it's too hard.

    Writing a page of valid XHTML isn't hard, once you get the hang of it. What is hard, is making sure that you can rely on your software (CMS, editor, etc.) to output well-formed and valid XHTML with the right MIME-type, the right character encoding, the right XML entities and so on.

    Just look at the troubles that even web standards evangelists have with comment validation. This is what keeps many away from using the right MIME-type. Do I need to say more?

    Posted by Ben at

  10. To be honest, I wouldn't bother submitting the article to ALA - it is still very much a Zeldman creation, and Zeldman has already announced that he's bored by the subject.

    I'm valid HTML 4.01 on any site that matters, valid, well-formed XHTML with the right mime type for testing purposes only.

    Posted by RichardPW at

  11. I write well-formed XHTML.

    One of the things that irritate me the most is people who urges to use XHTML, and further on serves it as text/html.
    I wrote a bit about this on my site, titled XHTML MIME types

    Posted by Henrik Lied at

  12. I write well-formed XHTML 1.1 and serve it up as application/xhtml+xml on my personal site. I still write within XHTML 1.1 guidelines at work, but am not able to serve it up as application material due to policy restrictions at the university. I also have to give it a XHTML 1.0 Transitional DOCTYPE because that's the baseline standard for page creation at the office.

    As they say, "I don't make the rules." :)

    Posted by Ryan Christie at

  13. Ben, where did I mention dates in my post? :-)

    Faruk, I hope you can make it solid.

    Richard, that he is bored doesn't really matter I guess; the people behind A List Apart think in XHTML.

    Posted by Anne at

  14. Well, if it's not well-formed XML then it's not likely to truely pass itself off as XHTML either...

    Something else maybe but not XHTML. Hopefully I'm making sense.

    Posted by Robert Wellock at

  15. Anne, yes the ALA people think in XHTML only - ALA was one of the principal motors for the adoption of XHTML (served as text/html) as the baseline standard for "standards-compliant" design.

    Now that the backpedaling is happening because of the realisation that IE will never support it and that perhaps draconian error-handling client-side is commercial suicide (or at least totally ill-advised), Zeldman has decided to step away from the debate and get all esoteric about design instead. It's partly natural - he's a graphic designer, not a coder, and he's not the kind of guy to get into this kind of debate. However, I don't think ALA would touch your article which would go against their mantra for the last 5 years.

    Posted by RichardPW at

  16. Pretty much verbatim from here.

    I just did a redesign, and one of my primary goals was complete standards compliance. Of course, the 1st question is: which standards?

    I decided to go for fully validating CSS, RSS 2.0, and Atom 0.3.

    I toyed with going for XHTML 1.1, but:

    1. I have 2 years worth of HTML posts, and I really had no desire to revisit them.

    2. The comment/trackback page invalidation issue is much more of a pain w/ XHTML.

    3. In the words of someone infinitely-well-qualified-to-know, "Every modern browser, including Mozilla and Safari, is much worse at XHTML than at HTML."

    4. Mark Pilgrim: "it's a pain in the ass with no demonstrable benefit."

    So fully validating HTML 4.01 it is.

    Posted by d.w. at

  17. Anne: the very first word of the second paragraph?

    Posted by Ben at

  18. Ben, I believe that is the second time today I read something completely wrong. Or it may be the first and the other thing might be second. Sorry for that, thanks for the correction.

    Posted by Anne at

  19. "Every modern browser, including Mozilla and Safari, is much worse at XHTML than at HTML."

    If that's true, why does Mozilla send an Accept header that states that it prefers XHTML to HTML?

    Posted by Tommy Olsson at

  20. I trust the guy who writes HTML and XHTML rendering engines for a living as an authority on the subject.

    Posted by d.w. at

  21. Sometimes the server-parsed code needs well-formed and/or valid markup.

    For example: One PHP templating systems I used requires well-formed markup.

    XSL is another place where you must use well-formed markup. An unclosed <br> in an xsl file will cause the parser to choke.

    Another example is the blog-comment feature on this very page - it requires valid (and well-formed) markup!

    In some such templating systems, you can get away with horrible, and even invalid, as long as it is well-formed:

     <Br></Br>   <tr> <Tr> <Div></Div> </Tr> <tr> 

    Though I would not recommend that, as it would cause unexpected and unpredictable behavior.

    When working with a parser that uses well-formed markup, use valid XHTML that makes sense structurally and semantically.

    Posted by DHTML Kitchen at

  22. Thanks, Anne, Devon and Dave.

    Posted by Randy Charles Morin at

  23. d.w.'s link should be here

    Posted by Randy Charles Morin at

  24. I’ve seen sites where the author clearly didn’t know what XHTML was, and used it only because it sounded advanced.

    I feel sorry for all the problems they must have had in getting it to lay out correctly.

    Posted by yafujifide at