<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.)

10 Comments

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

I knew posting twice in one day would end in tears. I suppose I should drag this thread over here where it goes, but I won’t, because I’m lazy.

Experimentally, it’s one in three: there seem to be plenty of people who will make a hash of one but not the other, one way or another: Firefox until you get FindTextInNode straightened out, My Yahoo! which is perfect on type="xhtml" but fails utterly on type="text".

 
 
Comment by Phil Ringnalda #
2005-12-18 17:33:06

Oh, nice. Those characters, of which I now have 88 in my possibly still-growing table, display in Internet Explorer, at least with the fonts I’ve got installed, as two identical boxes.

Note to self: ban Internet Explorer users unless they are cunning enough to change their user-agent string.

 
Comment by Lisa Williams #
2005-12-18 19:45:46

I know everybody hates HTML tables, but as an ordinary user I find CSS completely incomprehensible. It might be good standardswise, but I suspect it cuts out the vast majority of content creators on the web.

 
Comment by Doug #
2005-12-19 13:00:31

On Firefox 1.5 at work, I get colored boxes, all filled with question marks. I assume I’m missing a useful font. Any idea which one?

Comment by Phil Ringnalda #
2005-12-19 13:37:32

What was I thinking‽ (that’s an interrobang, the character than combines a question mark and an exclamation point, if you also don’t have font coverage in the lower 20xxs)

You need something from the list here – Code2000 covers a ton of things if you’re willing to spend $5 on shareware, OpenSymbol is included in OpenOffice if you’re willing to download a few squillion bytes to get a font, or the Ffree UCS fonts will cover a big chunk of Unicode with GNU-goodness.

Comment by Aristotle Pagaltzis #
2005-12-19 14:46:57

FWIW, the font most likely providing the glyphs on Windows systems that display the post correctly without further ado is Arial Unicode MS. It used to be available for download from Microsoft in a file called Aruniupd.exe but not anymore.

Comment by Phil Ringnalda #
2005-12-19 15:19:34

WTF? Now I’m eating the title attribute off your <abbr>s, so I have to edit them back in myself? Maybe I should just give you my phone number, and when you want to comment you can just tell me what to type ;)

Comment by Aristotle Pagaltzis #
2005-12-19 20:49:49

Hahaha. I really didn’t put anything in there, actually. My clipboard Markdown script wasn’t picking those up but I was too lazy to look into that. And while I may be obsessive enough to still mark abbreviations manually, I’m not enough so to actually type them out by hand.

 
 
Comment by Phil Ringnalda #
2005-12-19 15:28:19

Actually, I think I’m probably getting it from MS Mincho: I installed Windows East Asian language support because I like to have my East Asian spam look pretty.

 
 
 
 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <del datetime="" cite=""> <dd> <dl> <dt> <em> <i> <ins datetime="" cite=""> <kbd> <li> <ol> <p> <pre> <q cite=""> <samp> <strong> <sub> <sup> <ul> in your comment.