HTML House of Horror: Things That Go <BLINK> in the Night

Thanks to Anne Van Kesteren for inspiring the HTML House of Horror. I’m not sure if he really meant to inspire it, but life is funny like that. So read on… if you dare!

Introduction

Several years ago, my roommate Sam was playing around with a language he called “HTML”. The great thing about HTML, I thought, was the power it gave you over the screen. Just reload the page and presto! Words, colors, images, fonts — you name it. It was sooo much cooler than the “real” languages I had struggled with in college. I didn’t know how to turn the screen red in C++, but darned if it weren’t easy in HTML.

I still remember downloading and embedding my first image in a page, a tacky little dancing Santa animated GIF. “Check this out!” I said. Sam seemed kind of impressed, but not sufficiently so. Hmmm, I thought. Okay then, let’s try this BACKGROUND attribute…

Suddenly, the screen flooded with dancing Santas. That was the day I learned: with great power comes great responsibility.

The <blink> tag

Once upon a time, Netscape and Internet Explorer fought for the hearts and minds of HTML coders in what became known as the browser wars. Although the conflict ended long ago, the battlefield is still strewn with landmines, otherwise known as proprietary tags. The theory was that by adding whizzy new features available only in the Netscape (or IE) browser, developers would flock to that “platform”. Sadly, judging by the number of “best viewed in IE 4” messages that still litter the web today, the theory was pretty sound.

The Netscape-proprietary <blink> tag… well, makes text blink. Microsoft never implemented this tag in Internet Explorer. One might attribute this decision to Microsoft’s sensibility and good taste, but given their response to the <blink> tag, this explanation seems unlikely. Of the billions of pages on the public web today, there are only two sites in existence that make effective use of the <blink> tag:

Other than that, it’s all crap.

Although the <blink> never made it into the HTML standard, it still lives on to this day in Gecko-based browsers such as Netscape 7 and Mozilla. And although the tag itself is forbidden, have no fear! The CSS standard continues to provide the World Wide Web with critical blinking functionality, in the form of the CSS declaration text-decoration: blink. Inquiring minds might wonder — what happens if you declare the following CSS rule?


  blink {
    text-decoration: none;
  } 

On Mozilla/Mac, the result is as you would expect. I haven’t tested this markup on other platforms, but my theoretical model predicts that your system will just, like, explode. Don’t say I didn’t warn you.

The <marquee> tag

The Microsoft-specific <marquee> tag scrolls a selection of markup across the screen. Essentially, the <marquee> tag creates a 100% wide div with text creeping across the screen from right to left, or left to right. There are a large number of attributes for the <marquee> tag: you can change the width, the alignment, the scrolling speed, the scrolling delay, and even the scrolling direction (right to left or left to right).

And if that’s not enough shiny animated goodness for you, you can of course style the <marquee> tag with CSS. For some reason IE5/Mac ignores the width property, but you can still muck with the padding, font, and color to your heart’s content. Furthermore, IE4+ allows you to marquee-up arbitrary chunks of markup, not just text. If we need to have a table or bulleted list sliding across the screen, we can build it. We Have The Technology.

Note bene: nesting <marquee> tags is not recommended.

A Most Horrifying Discovery

And now we come to the most horrifying discovery of all. Mozilla supports the <marquee> tag. Let me repeat that — Mozilla supports the <marquee> tag. In other words, the following markup is now possible:


  <marquee>
      <blink>Night Of The Living Dead</blink>
  </marquee>

Back in 1997, the line of demarcation was clear: Netscape supported <blink>, Internet Explorer supported <marquee>, and that was the end of the story. But today in 2003, we have a browser that supports blinking marquee text. Yes, only in the fiendish laboratory that is the Gecko Rendering Engine is such a crime against humanity even possible.

There are those who believe that there are lines that should never be crossed. There are those who believe that there are Secrets Man Was Not Meant To Know.

And then there are those who forge boldly onward on paths where more timid souls dare not tread. In the interest of Science,[1] I have have painstakingly constructed the most horrifying web page ever written. Behold! The Page of the Damned![2] (view source) Those of you with a Gecko-based browser will see the Page of the Damned in all its glory; anyone using a lesser browser will be shielded from the horror. So if you do doubt your courage, or your resistance to video-induced epileptic seizures, come no further. Either way, may you forgive me for my crimes, and may the W3C have mercy on my soul.

Happy Halloween!

1. Mad Science!

2. The Page of the Damned uses no JavaScript. It does use a smidge of CSS, but only because the <basefont> tag doesn’t seem to work in Mozilla. Also, to my great disappointment, Mozilla doesn’t support the direction attribute of the <marquee> tag. So in theory the page could have been even more horrifying, but we make do with the tools we have.

Worst. Tag. Ever.

“Rest assured, I was on the Internet within minutes, registering my disgust throughout the world.”

So far, this week has not been a great week, technology-wise.

First, this week’s award for Kookiest Third-Party Documentation goes to JUnit.org, for their rather creative Javadoc description for TestSuite.createTest(). Umm, guys, the traditional we-don’t-give-a-rat’s-ass-about-our-Javadoc Javadoc would have been something like, “TestSuite.createTest(): Creates a test.” Better to be random and pointless than simply pointless, I suppose.

Second, a special shout-out to Dell for designing their hardware such that you can’t buy 3rd-party memory. Let’s see, $210 for two sticks of PC100 RAM.[1] At least now my system can handle amazing feats of computational wizardry… such as running Netscape and FrameMaker at the same time.

But the real winner of this week’s sweepstakes is the <object> tag. The problems with this tag are well-known. Yes, it has terrible support in modern browsers. Yes, it is the only replacement for the <img> tag in XHTML2still. And no, the situation is not going to improve significantly until about the year 2006. But you’ve heard about all that. I’d like to share with you my particular episode of <object> tag pain.

The trouble started when I decided to play around with SVG. I dutifully downloaded the Adobe SVG plugin, and soon I was off to the races.

So how do you embed SVG in a web page? In theory, you could do it inline… if you served up a pure XHTML page with the right MIME-type, and a carefully constructed DOCTYPE, to the right browser, on every third Sabbath after Simchat Torah. But even the foolhardy don’t bother with this strategy. No, the accepted method uses the <object> tag, like so:

<object type="image/svg+xml" data="/path/to/image.svg"
    width="400" height="400">
  <img src="/path/to/image.gif" width= "400" height="400" 
    alt="description" />
</object>

The <object> tage embeds the SVG image, while the old-fashioned <img> tag provides a fallback GIF image for older browsers. Elegant, right? Only problem is that this markup crashes my copy of Safari every single time.

The problem is with the type attribute, which specifies the MIME-type of the SVG file. If the attribute is present, Safari crashes. If you delete it, Safari works just fine, but IE 5.2 for Mac no longer displays the object. Apparently IE5.2 needs the MIME-type explicitly defined. (This might also be the case for IE/Win, but I haven’t tested this yet.) Note that both browsers have interesting and quirky behavior. Safari is perfectly happy to display the SVG image if there is no type attribute at all or a totally made-up value (such as “foo/bar“. However, a wrong MIME-type (“text/html“) causes Safari to A) not display the image and B) bring a Finder window to the foreground. (?!) IE5.2, on the other hand, refuses to display the object if the attribute is absent or if the MIME-type is totally made up… but it does display the image if you provide any MIME-type that it understands, such as text/html. Meanwhile, Mozilla displays the image in all circumstances.

But don’t fret! You know what works for all three browsers, every single time, with no crashing or quirks whatsoever?

<embed src="/path/to/image.svg" width="400" height="400">

Yeah, I need a drink too.

1. Seriously, who do these Dell guys think they are? Apple?

The End of Gerrymandering

What with the recent spectacle of Tom DeLay waltzing into Texas (in an off year) and breezily eliminating six or seven Democratic seats, coupled with the new enthusiasm for the Schwarzenegger-backed “fair redistricting“– I’ve been thinking about gerrymandering. A modest proposal:

For any proposed congressional district, take the perimeter squared and divide by the area. This number yields the district’s gerrymander number, G.[1] Now set a cap on G — say, for the sake of argument, 100.

Taa-daa.

Oh, and another thing — if I were King, “team” would be spelled T-E-I-M. Thank you very much.

1. For example, a circular district would have a G = 4pi, a square district would have a G = 16, a 4 x 1 rectangular district would have a G = 25, and so on.

Soccer Hooligan

When I was a sophomore in college, I read a fascinating book about the large-scale distribution of galactic clusters. One might expect galactic clusters to be scattered randomly, but they aren’t. Instead, galactic clusters seem to be distributed along the surface of nearly empty “bubbles” that tens of megaparsecs in diameter. In fact, if you map the structure of the visible universe using galactic clusters, at the largest scales it looks a lot like… bubbly, frothy beer! Pretty neat. And similarly, at the most extreme end of the small scale, physicists theorize that spacetime breaks down into “quantum foam”, a seething chaotic morass of fluctuating loops and bubbles. Bubbles… foam… like beer! At all length scales, the universe seems to be trying to tell us something…

I’m sad to report that this is what passed for deep insight when I was 20.

Now according to a recent article in Nature, the universe could be finite and shaped like a soccer ball. Or more properly, a dodecahedron. If we couple that with the observation that some of our universe’s more interesting carbon molecules are also shaped like soccer balls, we are led to a rather disturbing conclusion. God clearly likes beer. God might like soccer. The question theologians have pondered for centuries lingers in the air… could God be a soccer hooligan?

Fortunately for all of us who are not soccer hooligans,[1] Jacques doesn’t think much of the Soccer Ball proposal:

Most likely, this is just foreground junk, and once the foreground subtraction is done better, these two datapoints will cease to stand out, and the apparent lack of isotropy at large angular scales will go away.

The data from the WMAP probe is still very preliminary, so it seems reasonable not to get excited over this yet. But of course I don’t need Jacques with all his fancy math to tell me that Soccer Ball hypothesis is in trouble. Just look at the hyperactive response on Slashdot. I can’t imagine that Luminet, Weeks, and colleagues could look at the raving fanboy response on Slashdot and not realize that the whole thing is doomed, doomed. At least we can be grateful that the Slashdot weenies don’t read Jacques on a regular basis. Otherwise one of them might read his post and discover that another possibly valid topology for the universe is an icosahedron. Lord only knows the tidal wave of dorky speculation that little idea would unleash.

1. Oh all right, so it’s really “football hooligans.” Excuuuuse me.

I, For One, Welcome Our New Republican Overlords

Since absolutely nothing of importance happened today, it’s clearly time for… more Sports Night than you can shake a stick at!

  • From Angela’s No-Frills Sports Night Page: the Sports Night Drinking Game. Good stuff, although I would add “Jeremy berates himself (out loud) for talking to himself (out loud) — 1 drink” at the very least. Also see the superb FAQ section, which answers the eternal question, “How is it that Dan forgot he was ever in Spain?

  • A selection of Sports Night scripts. Includes the original script for “Eli’s Coming“, which answers the aforementioned Dan-in-Spain question, and the original script for “How Are Things in Glocca Morra?”, before it was re-written to account for Robert Guillame‘s real-life stroke.

  • Who Would You Kill On Sports Night? To my astonishment, Isaac beats out everyone. Even Gordon. It is a sick, sick world we live in.

  • I Can’t Believe It’s Not Sports Night! Ladies and gentlemen, I have scoured the Internet to provide you with only the finest of Sports Night Fan Fiction. And here it is, on a silver platter: behold Episode One of “Season Three”. I hereby grant this fan-written episode the highest possible rating: “Actually Pretty Good.” Yes, really. The rest of the episodes in “Season Three” are a little more uneven, but you take what you can get. (I should note that when I said, “scoured the Internet”, I specifically excluded the wonder that is Sports Night Slash Fiction. I love you all, but not quite that much.)

  • Television Without Pity: Sports Night. Able staff member Daniel MacEachern handles his Sports Night recaps in typical Television Without Pity style. Pick one character on the show that you “like” just to prove that you don’t hate the show with every fiber of your being, and proceed to tear into everyone and everything else on the show with a clear conscience. Actually, Daniel goes one better — not only does he like Isaac, but he also likes (minor character) Kim. (Although I think Daniel’s appreciation for Kim comes from a less-than-pure place.)

    And that’s the problem with Television Without Pity — can you really trust the recappers? For example, take Jake 2.0. From the recap ratings (a nearly consistent string of As and A-pluses) it seems like it would be a good show. On the other hand, the recapper seems completely in lust with Jake 2.0’s nanotechnology-powered nerd superhero, so maybe she’s not the most reliable source of information.

  • Finally… a Reliable Source indicates that not only do Josh Malina‘s parents (Mr. and Mrs. Malina) attend a Conservative shul in the Los Angeles area, but Joshua Malina himself showed up for Yom Kippur services. It’s a good thing I wasn’t there — I probably would have been tripping over myself to run over and say, “Dude! I loved you in Sports Night, man!” or something similarly asinine. Fortunately, our Reliable Source has much better manners than I do.

So Many Choices!

So I’m looking through my official Voter Information Guide, and I have to say, I’m extremely disappointed that Libertarian Pat Wright, the ferret guy, is not running for governor. After some exhaustive research, I discovered the reason why: California has crushed his spirit.

I am no longer an advocate for ferret legalization. I don’t believe such freedom is a possibility in California.

I am ashamed of my state, and I am ashamed of my nation for invading and occupying Iraq (among other things). I do not believe the average person can have any impact on the government here in California or the USA. I further believe our state and nation are hopelessly corrupt.

Wow.

Fortunately we still have many other fine candidates in the race. Consider Independent candidate Trek Thunder Kelly, who has what can only be described as the most kick-ass website of all the gubernatorial candidates. Kelly caught my attention in the Voter Guide with his statement, which I reprint in full:

Dear Voters, Please vote for me, thus breaking the Seventh Seal and incurring Armageddon. I will legalize drugs, gambling, and prostitution so that they may be taxed and regulated, the funds derived would subsidize the deficit, education, and the environment. I believe in peaceful resolutions backed by a strong military; I don’t care who you marry or have sex with.

Further investigation reveals that Kelly, a Venice Beach artist, is in his “blue period” (meaning that he currently wears nothing but blue). As for his diet: “I eat only tacos [tacos!!] and steak. I drink only water, salsa, and Cran-grape juice.” If you add bagels, egg salad, and pizza, that’s almost exactly my diet. Whoa. Oh, and beer at Poker Night. And by the way, continuing last entry’s theme concerning cheap drink, I have a confession to make: I’ve been drinking a heckuva lot of Coors Light at Poker Night these last couple of months. I know, I know. Call it my “Silver Bullet period”. I don’t know what it is, but there’s something about cheap, very cold, nearly flavorless beer that seems to suit Poker Night just fine. Besides, it’s a good thing to avoid the fancy-schmantzy beers every once in a while and get down to your roots. I remember a couple of years ago my friend Brian accused me of being “elitist yuppie slime” because I had never eaten a TV dinner in my life. This coming from a man who has a physics degree from Harvey Mudd, an MBA from Columbia, and is on record as wanting to be our nation’s first Asian-American Secretary of State. As you can tell, it kind of stung.

So back to Trek Thunder Kelly. While I approve of many of his policies, I’m not so sure about that Seventh Seal stuff. Now I’ll admit I’m not as up on this newfangled “New Testament” as I should be, but I do know that this Armageddon thingy doesn’t seem very pleasant. So we’ll give Kelly a pass. The other gubernatorial candidate of interest is Republican Rich Gosse, whose Voter Guide statement consists of the following:

Single adults are the Rodney Dangerfields of our society. They “can’t get no respect.” I am the first candidate in California history to campaign on a Fairness for Singles Platform. [Emphasis his] Visit my website for my views on reducing crime, solving the budget crisis, and improving education.

I just might have to vote Republican in this election, because Gosse is totally on the right track. Singles are the Rodney Dangerfields of our society. Take the sad story of the “Marriage Penalty” (please!) It used to be that some married couples paid fewer taxes than they would have if they were single, and some paid more. But then some politicians invented the concept of the Marriage Penalty, which clearly had to be eliminated in order to Protect The American Family. The upshot is that now the tax code ensures that a single taxpayer pays more than an equivalent married couple under nearly all circumstances. Sounds fair to me.

Of course the real problem is that everyone loves to drone on about protecting marriage and family values and whatnot, and meanwhile nobody is out there lobbying for Us. The Single People. You know, the hardworking folks who are out there buying electronic gadgets, going out to concerts and restaurants, swilling countless liters of booze, and basically keeping the damn economy afloat. Clearly we single people need a lobby of our own. And maybe a March on Washington. Sure, there was a Million Mom March, but I’ll take the Million Singles March any day. Seriously, after the march was over, whose post-March party would you want to go to?