datetimemicroformatshtml

How can I semantically define within the <time> tag 'the present'


I am using time tag to define a time—seemed like the right approach ;-)

My problem however is the value I want to place within the time tag is NOW: the present. I get this validation error:

The text content of element time was not in the required format:
The literal did not satisfy the time-datetime format."

Looking at the spec, it doesn't seem possible to define 'NOW'. That's a nuisance. Any ideas on how to approach this?


Solution

  • You cannot. The time element in HTML5 is defined as markup for specific moments or periods or durations of time or for time offsets, not for all concepts related to time.

    You can write e.g. <time datetime="2013-04-06T13:53">now</time>, thereby associating a fixed moment of time with the text content “now”. I don’t see how this could be useful, and the usefulness of the time element in general is questionable (it looks like markup for markup’s sake), but things like this are all you can do to “define ‘NOW’” with time.