Where the HTML4.0 did they come from?

disk driveOn some days you learn something new every day. For me, today was like 20 of those every days.

Being a particularly delightful Sunday morning, I decided to look up the HTML4.01 specs on W3C. My findings shocked and amazed me.

Now, I'm not claiming to be some kind of know-everything-about-html guy... But I mean, I first learned HTML in like, 1993. I've outlived the BLINK tag; I was there during the days when tables where only used to display tabular data - before they weren't, then were again; and it was oh-so-long-ago since I learned about TH, TBODY and TFOOT tags. Surely by now I would have somehow and somewhere seen everything? Surely!

Not even close. Running through the Index Of Elements of the specs turned handfulls of non-deprecated tags I ain't ever heard of. I'll list them from the most boring, to the the most interesting ones I found.

The KBD, VAR, DFN and SAMP tags

These are part of the list of phrase elements which add structural information to text fragments. They are defined along side of the EM, STRONG, CITE, CODE, ABBR, and ACRONYM tags - which are all the rage these days.

<KBD> Indicates text to be entered by the user.
That must have seemed darn important at the time the specs were created. When every single web page was about learning Unix. Maybe now they should have a CLICK tag or something.

<VAR> Indicates an instance of a variable or program argument.
Another useful one. Where would the disneyland web site be with the VAR tag?

<SAMP> Designates sample output from programs, scripts, etc.
Are you starting to see why these ones never made the big time? I'm a programmer and they're making me sleepy.

<DFN> Indicates that this is the defining instance of the enclosed term.
I don't know, and don't even care any more. Lets skip the phrase elements hey. Here's another slightly more interesting one I didn't know about...

Q: the quote tag

The quote tag is partner-in-crime with BLOCKQUOTE, but it doesn't indent like its big brother. Its an inline element, so indenting really wouldn't make too much sense anyway.

What it does do however, is automatically add in quotation marks for you. Think of the time that'll save! It's supposed to handle nested comments too - adding single quote marks for the nested quote.

They don't seem to work in IE though. And Firefox doesn't do the single quotes on nested comments. C'mon guys... don't you read the specs?

Here's an example of nested Q tags: A great man once said You know, a great man once said A great man once said...

I didn't put those quote marks in there. The magic Q tag did.

Marking document changes: The INS and DEL elements

INS and DEL are used to mark up revisions in your HTML document, a-la Microsoft Word's Track Changes function.

I think these two guys could have a big future with the web standards crowd (assuming they aren't a hit already). Past changes and new additions can be annotated using the cite (who made the change/for what reason etc) and the datetime attributes - giving the complete history of the document over time.

The only problem with using them in practise - on say, the Official Home and Away Web Site - is that they are marked in a very visual way. Here's an example:

My favourite new tags I have learn't are the KBD and VARINS and DEL tags.

Deletions are struck out, and additions are underlined. Like Track Changes. But if you hid the deletions, and un-underlined the inserts, it could be a pretty nifty feature of your site - with "past version" buttons that un-hid deletions. Or whatever.


I still can't believe this one exists. It was actually a co-worker who told me about this one. I refused to believe. He challenged me to look it up on W3C. This blog post, and the price of a Coke, was the result.

What's a fieldset?

This is a fieldset. Fieldsets allows authors to group thematically related controls and labels

Well, whatever, but holy-cow... Where did this thing come from? Fieldsets are defined with the <fieldset> tag. The heading is set via the <legend> tag.

Fieldsets are documented under the Forms section of the specs, so I guess they are only supposed to be used with forms. I think that's more of a guideline than a rule though.

Of course, once I found out about it, I've seen them everywhere. Heck, I'm posting this from WordPress and the admin page is covered in them. If this exercise has taught me nothing else, it's to start paying more attention.

That's about it

After I'd gone through all the elements, I started to have a look at the attributes. This made me woozy so I stopped. Once I get over the euphoria of the fieldset I'll revisit them. Hmm, and maybe the javascript spec too... I'll let you know if I find any juicy ones.