in reply to Re: Your kung fu is excellent but what about...
in thread Your kung fu is excellent but what about...

For me, using strict XHTML and stylesheets helps when writing programs to parse the output of a page. While parsing, it's easy to ignore one big <style> tag. It's harder to ignore a bunch of <font> tags littered throughout the document. Other XHTML additions, like forcing a well-formed tag layout, also help here.

Further, adhering to the standards covers you. If I create XHTML-strict/CSS that passes the validator, and the standards quite explicitly say how the given code should render, then any other rendering is a browser bug, and not my fault.

"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Replies are listed 'Best First'.
Re^3: Your kung fu is excellent but what about...
by tilly (Archbishop) on Dec 13, 2004 at 16:25 UTC
    You're right that screen scrapers benefit from XHTML. But when I've written the HTML in the first place, I've never seen it be in my interest to encourage screen scraping. Besides which, when I have to screen scrape, I'm generally paranoid enough not to believe that things are XHTML, and I think that anyone else screen scraping probably (should at least) make the same assumption.

    As for your comment about browser bugs, I'd frankly be astonished to encounter a workplace where you can get away with saying, "My webpage is fine but IE 6 happens to be broken. Complain to Microsoft." As long as IE is the bulk of the market, any website that is broken in IE is going to be considered broken, no matter what the official standards say.

    Generally speaking, I find that if I develop against Mozilla and then fix occasional breakages with IE, I'll wind up with something that works reasonably well on most major browsers. Running through a basic HTML validator looking for unclosed tags takes care of most of remaining browser differences. By contrast, as many complaints out there attest, producing a sophisticated web page using all of those juicy CSS standards typically results in a website that doesn't render right for most people (who, like it or not (I don't) use IE).

      I personally want to encourage screen scraping. At the very least, it makes automated testing of web pages possible. Getting management to agree is a different matter . . .

      I find that if I develop against Mozilla and then fix occasional breakages with IE, I'll wind up with something that works reasonably well . . .

      I find this true, too. Mostly, my statement was concerned with even more niche browsers than Mozilla (Opera, Konq/Safari). I'm also blessed with a userbase that is around 70% Mozilla (or derivitive) (specifically, our userbase is mostly computer-illerate academics who were told to use Mozilla :). In such an environment, it's easy to tell non-standards-compliant browsers to go fix their bugs and leave me alone.

      "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.