Archive for October, 2011

Goodbye HTML5 <time>, hello <data>!

This post is obsolete. See The return of <time> for the latest information.

It’s with great sadness that I inform you that the HTML5 <time> element has been dropped, and replaced by a more generic – and thus less useful – <data> element. The pubdate attribute has been dropped completely, so there is now no simple way to indicate the publication date of a work.

Editor Ian “Hixie” Hickson explained:

There are several use cases for <time>:

A. Easier styling of dates and times from CSS.

A way to mark up the publication date/time for an article (e.g. for
conversion to Atom).

C. A way to mark up machine-readable times and dates for use in Microformats or

Use cases A and B do not seem to have much traction.

Use case C applies to more than just dates, and the lack of solution for stuff
outside dates and times is being problematic to many communities.

Proposal: we dump use cases A and B, and pivot <time> on use case C, changing
it to <data> and making it like the <abbr> for machine-readable data, primarily
for use by Microformats and HTML’s microdata feature.

I think this is a bad decision.

<time> was originally dreamed up to correct an accessibility problem with microformats that James Craig and I raised in 2007.

While Hixie says it hasn’t had much traction in microformats. Ben Ward, a platform developer at Twitter and microformats admin, says “We’ve had time documented on the wiki HTML5 page for ages, some parsers had experimental support. But <time> wouldn’t be able to progress into being a requirement or even recommendation for Microformats until HTML5 had that status”.

It’s also used on and (with Alexa rankings of 112 and 549, respectively – hat-tip, Mike Taylor), the Boston Globe and default WordPress theme, twentyeleven (which has a mere 2.6 million installs). It’s also used in the Atlassian suite of products: JIRA, Confluence, Bamboo and BitBucket (hat-tip Ben Buchanan). Drupal developers have been adding it to the core theming systems, too.

<time> (or its precursor, <date>) has an obvious semantic (easy to learn, easy to read). Because it’s restricted to dates and times, the datetime attribute has a specific syntax that can be checked by a validator. Conversely, <data value=””> has no such built-in syntax, as it’s for arbitrary lumps of data, so can’t be machine validated. This will lead to more erroneous dates being published. Therefore, the reliability and thus the utility of the information being communicated in machine-readable format diminishes.

The <data> spec says “A script loaded by the page (and thus privy to the page’s internal convention of marking up dates and times using the data element) could scan through the page and look at all the data elements therein to create an index of dates and times.”

This is a retrograde step from the <time> element that uses a wider standard/ convention for dates, such as ISO8601 because now the script must be “privy to the page’s internal convention”.

<data> as an element is for public consumption, eg for crawlers, search engines, microformats/ microdata parsers. Convesely, data-* attributes are private (only for scripts on a page, not external crawlers: “These attributes are not intended for use by software that is independent of the site that uses the attributes.” ). This is highly confusing.

I’ve added these points to a collaborative notepad set up by Eric Eggert, at his request.

But I have little hope that <time> and pubdate will be restored, even though most comments on the bug in which Hixie changed the spec were negative.

But sing along with me in my Cher costume, and we might just change Hixie’s mind.

Added 20:06 Oct 30: The Mighty Steve Faulkner filed a revert request.

Usual disclaimer: personal opinion, written on Sunday night, not Opera, etc etc.

Other discussion

Update 4 November 2011

At an HTML Working Groupp meet last night, it was decided to re-instate <time> and even extend it to encompass things I complained in 2009 were lacking — “fuzzy dates” like “1965” or “February 2008” and durations.

However, it remains to be seen whether it’ll be reinstated in both the W3C spec and the WHATWG versions or just the W3C. So I’ll delay celebration until then.

(Last Updated on 16 November 2011)

Netherlands, Norway, UK, Poland

Phew. It’s been a full few weeks with lots of conference talks and travel.

First was Over the Air 2011, on a beautiful summer-like day in Bletchley Park. I spoke on how to make sites that work well across devices in a presentation called Web Anywhere: Mobile Optimisation With HTML5, CSS3, JavaScript.

Next week saw me jetting off to Amsterdam for Fronteers 2011. This has, I think, become the best conference in Europe; the level of talks is high (the audience has a disproportionate number of working group members, high-profile developers and all-round smart people, never mind the speakers!) and the fact that Fronteers is not allowed to make a profit means that they can keep it cheap. I confess to being a bit nervous for my talk — the topic they gave me of “HTML5 semantics” doesn’t exactly cause your average web developer to moisten his seat with enthusiasm, but it was a single-track conference so I didn’t find myself alone in a hall while eveyone went to hear Lea Verou on gradient sexiness instead.

As well as looking at some of the new semantics, I wonder whether we need more than the current spec allows, then wonder whether semantics matter anyway (tl,dr: yes, they do) and suggest that, if you’re just squirting obfuscated JavaScript down a line with no real semantics, and targetting one single rendering engine, you’re really just reinventing Flash but with the browser as the plugin. This follows some of my recent posts such as Future friendly, or Forward to Yesterday?, HTML5, hollow demos and forgetting the basics and the toe-tappin’ Web Standards Hoedown.

Anyhow, I must have done something right as 99,000 people have viewed the slides on slideshare in 3 weeks. (Slides: You too can be a bedwetting antfucker). Here’s the video:

Those nice people at Fronteers have transcribed the video, too.

By clever planning, I flew home from Amsterdam on Saturday in order to fly to Norway on Sunday (via Amsterdam). I was there to MC the Frontend conference where the organisers used large stand-up cartoons of me to entice the Oslo ladies in.

bruce with lifesize caricature

Frontend had one of the weirdest conference parties I’ve been to; we sat in an ex-church, drinking red wine and beer and listened to Oslo’s leading Norwegian-language Calypso band.

From the conference, I went by taxi an Opera event for journalists where I was tasked with stopping the journos becoming mutinous or falling into jetlag slumber during a 20 minute bus ride from their hotel to a restaurant. Rather than sing the Web Standards Hoedown without Ukelele or hippie, I was able to finally realise a long-held ambition of doing a completely fictional bus tour. On our way to downtown Oslo, I was therefore able to point out to my increasingly incredulous fellow-travellers the summer palace of King Gustav The Mad, the high school that was long believed to be the only Norwegian building visible from space and the very tree in which John Lennon wrote Norwegian Wood.

A full three days elapsed before I travelled down to Lahndahn to do a guest Q&A talk at a Kazing HTML5 training course (lots of questions about DART, privacy on the Web and Web vs Native) and then the next day, an overview of HTML5 at HTML5 Live where I pissed on a few bonfires by pointing out

  • HTML5 is nothing to do with mobiles
  • a website that is ugly and full of nonsensical jargon remains so even if sprinkled with HTML5 fairydust
  • a site that fulfills an organisational need rather than user need remains a vanity turd even if sprinkled with HTML5 fairydust

Narrowly avoiding a lynch party, I escaped up the M11 with Jake Archibald where we boarded a RyanAir flight to Krakow in Poland to speak at the inaugural Frontrow conference. Poland is super country, and Krakow seems a delightful city from my brief walks around its pretty centre.

I was also thrilled, on learning that it’s pronounced “Crack Off”, to find this mini-guide to the city in my room:

book called 'Crack Off in your pocket'

Full marks to Mariusz, Olga and the rest of the organising committee for a really great line-up mixing Polish and foreign speakers. Congratulations to my old chum Patrick Lauke on his first conference keynote The once and future web. I spoke about HTML5 Multimedia to a small group of people at 9 am on the second day (the day after the conference party, which went on til 6 am!).

After an eventful return flight which arrived 4 hours late (and meant at least that RyanAir couldn’t play their stupid arrival fanfare), I spoke at a conference of 148 venture capitalists and other investors organised by UBS – and I wasn’t even wearing cuff-links!

Just two more talks this year – one at Staffordshire Universtity and one at Heart and Sole in Portsmouth on 18 November, and I’ll be attending two events for my own training – Full Frontal and Seb Lee-Delisle’s Creative JavaScript training in Leeds.

(Last Updated on 4 November 2011)