W3C Drafts: XHTML 2.0, CSS2.1

The W3C released several new drafts this week, most notably the XHTML 2.0 Working Draft. The new proposed spec drops <img> in favor of the more robust <object> element, allowing for a nested hierarchy of different media objects that can be displayed by the UA in the event that certain content types are unsupported.

I've been crossing their fingers on this one for a while. Finally, web authors will no longer have to depend on unreliable javascript plugin sniffers and cookies to supply alternative content for UA's without plugins, or without the ability to display certain image formats. Granted, the new method of creating an image is a bit more, well, verbose:

<object data="foo.gif" type="image/gif">
    <param name="width" value="128" />
    <param name="height" value="64" />
    here's your alt text
</object>

I still think it's a move in the right direction. The W3C hasn't created a DTD yet, apparently because there is an "open issue about how to integrate the XForms instance data" (XHTML2 drops HTML form elements in favor of XForms), so I can't tell whether or not other elements will be allowed within <object>. This would be an even greater improvement that would allow authors, if they wished, to substitue rich media with styled markup (as opposed to the CDATA-only limitation on alt attributes).

Another update from the W3C was the CSS 2.1 Specification (or, more formally, "CSS Level 2 Revision 1"). Most of the updates consisted of error corrections and clarifications, but I was most pleased to find out that:

The underscore character ("_") is allowed in identifiers.

Hooray! Another one I noticed was that border-color and its ilk now allow the value "transparent" (although I'm not sure how any of the UA's interpret this at the moment). Margins are now computed in determining a positioned element's offset from the edge of the containing block. Also, the white-space property applies now to all elements, not just block-level elements (some UA's got this right with their CSS2 implementations, regardless of the spec).

Go yee forth, and implement standards!

Everybody's doing it: XML (NetNewsWire recommended).

100% Valid or your money back.

Thanks, Movable Type!