<style> in an age of HTML fragments

I’m staring at an HTML <table>, something I haven’t done in quite some time now. I want it to look like the one Sam used while talking about OPML validators, with red and green ✖s and ✔s, horizontally centered in their table cells. Easy enough to do “The Right Way” — add a couple of classes to my stylesheet, testpassed and testfailed, give them an appropriate size and color, and either put the centering in those classes or add another testresults class to select the <td> descendents of a <table> with that class. A bit silly to carry those classes around forever, but maybe I’ll find use for them again.

And then off it goes, to where most people will read it, in my feed, without that stylesheet.

Until XHTML 2 tears it out of my cold fingers, I could still use a style attribute on each <td>, but any aggregator which doesn’t strip style attributes is playing with fire: maybe they can get rid of every way that Internet Explorer lets JavaScript sneak through in a style attribute without stripping the whole thing, and maybe not.

O brave new world of syndication, where the best way to turn a character big and red is with <font size="+2" color="red"> and the best way to center text in a table cell is with align="center". (And while thinking about whether it was worth publishing this, I scanned through my feeds, and noticed a table beautifully presented. As a screenshot image.)


Comment by Robert Sayre #
2005-12-18 17:11:49

Don’t you still have a one-in-two chance with Atom? Escaped stuff should be the same in type=”text” and type=”xhtml”, right? type=”text” is to type=”xhtml” as ASCII is to UTF-8.

Comment by Phil Ringnalda #
2005-12-18 17:23:15