HTML5 Zone is brought to you in partnership with:

John Esposito edits Refcardz at DZone, while writing a dissertation on ancient Greek philosophy and raising two cats. In a previous life he was a database developer and network administrator. John is a DZone Zone Leader and has posted 331 posts at DZone. You can read more from them at their website. View Full User Profile

HTML5 < time > element: gone!

10.31.2011
| 6824 views |
  • submit to reddit

The <time> element is now gone from HTML5.

After a four-month discussion, W3C decided on Saturday to drop <time> because timestamps can be entered under <data>, a generic HTML5 tag designed to mark machine-readable information.

Ian 'Hixie' Hickson stuck with his original reasons for abandoning <time> (from his original proposal in July):

There are several use cases for <time>:
A. Easier styling of dates and times from CSS.
B. 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
microdata.

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.


So far plenty of people don't like the decision -- starting with Peter Winnberg's reply, posted less than three hours after the decision was made.

Ian Devlin contradicts Hickson's claim regarding (A) and (B):

Many documents and pages that get posted on the web have some sort of timestamp attached to them. Think of every news and blog article that’s written, this very post included, that indicate somewhere when it was posted. Having a machine readable element that encapsulates this special case piece of information is very useful for both machines and humans alike to read and understand.

Eric Eggert's collaborative list of objections at typewith.me agrees with Winnberg in objecting to Hickson's response to (C):

The data element is just a container like div or span. The only difference is the value attribute which could be made valid for (nearly) every element, thus eliminating the need for data completely.

Bruce Lawson argues that <time> has already proved very useful for plenty of users, and adds:

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

Many points were already raised in the full w3.org discussion, which makes an interesting read.

So -- an HTML5 semantic controversy, over how specially time should be treated. This is a significant question, a big splash in the already-roiled microdata pond.

And, thanks to this decision, the vast question resurfaces: how are machine-readability and semantics related?

What do you think?

Comments

Robert Craft replied on Thu, 2012/01/26 - 6:35am

The time element is really simple to be used. I’m currently transforming my static resume in to HTML5 powered mini site. The only issue i ran in to and in my point of view the biggest downfall of the time element is that it doesn’t allow you to specify time or date ranges. You will need to create 2 separated time elements. For example my resume has a work experiance sections that displays my previouse jobs with the dates ” Jun 2000 – Present It would be more secematic if i could do Jun 2000 – Present instead of Jun 2000 – Present

Spring Framework

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.