John McCain supports Bush's wiretapping, and will also spy on Americans!

by Thomas J. Belknap Geeky XHTML Goodness for You!

So, OK, bloggers.  Our entire blogging world is based on X/HTML standards compliance, even if most of us don’t really know it.  Believe it or not, the more standards-compliant a given web page is, the easier for the Google and other bots to read your stuff and the more likely to get accurate statistics.  That means stack rank, y’all!

So, whatever.  The point is, there’s a new sheriff in town: X/HTML5, which replaces both XHTML1.0 and HTML4.0, or will once it becomes standardized.  In the below-linked discussion, some really hard-core web geeks discuss the issue of standardization.  For many a coder, HTML represents a frustratingly open-ended concept because browsers were written to bypass errors in the code and continue rendering with “best guess” practices.  That means that a surprising number of web pages do not even come close to fitting the standards as they sit even now, to say nothing of future implementations:

Conversation With X/HTML 5 Team

Vlad Why not put an end to “tag soup” by requiring user-agents to only accept markup written to specification?

Ian There are literally dozens if not hundreds of billions of documents already on the Web. A study of a sample of several billion of those documents with a test implementation of the HTML 5 Parser specification that I did at Google put a very conservative estimate of the fraction of those pages with markup errors at more than 78%. When I tweaked it a bit to look at a few more errors, the number was 93%. And those are only core syntax errors — it didn’t count misuse of HTML, like putting a p element inside an ol element.

If we required browsers to refuse those documents, then you couldn’t browse over 90% of the Web.

But consider — if one browser showed error messages on half the Web, and another browser showed no errors and instead showed the Web roughly as the author intended. Which browser would the average person use?

If we want to make HTML 5 successful, we have to make sure the browser vendors pay attention to it. Any requirements that make their market share go down relative to browsers who aren’t following the spec will immediately be ignored.

Fascinating, no?  It’s the classic HTML quandary: allowing non-compliant code to render makes it easy for even the most novice of coders to write for the web, which makes the web so highly popular; allowing non-compliant code to render also makes moving the standard forward to encompass more richly-coded and interactive web pages damned-near impossible.

And in fact, there’s another ripple that web designers know all to well: because browsers have to put “best guess” practices to use to render non-compliant code, that means their guesses can be outrageously different from one another.  That means that even if you write compliant code, it may be rendered differently from browser to browser!  That, my friends, is why coders get so pissy about compliance: you can’t write consistent code for the web without writing lots and lots of code, sometimes intentionally breaking the rules to accommodate different browsers.

This is a great read.

Technorati Tags: , ,

Powered by ScribeFire.

2 Responses to “Geeky XHTML Goodness for You!”

  1. zcorpan
    March 30th, 2007 | 1:21 pm

    Actually, as of HTML5 it is defined exactly how UAs are to handle non-compliant code, including parsing. So there’s no guess-work anymore, you just follow the HTML5 spec.

  2. March 30th, 2007 | 1:35 pm

    @zcorpan: Well, we learn something new every day. Thanks! Now if we could just get Microsoft to be compliant with anything at all. . . .

Leave a reply

Please note: Due to administrative constraints, approved comments can take up to fifteen minutes to appear here. Moderated comments will be reviewed and if accepted, posted as soon as an administrator can do so. Please review our User Content Policy for more information.

    DragonFlyEye.Net is now mobile! Try it today from your mobile phone!
    ClickHeat : track clicks