Time Element in HTML5
Time as you would expect is used to markup temporal information. It can be used for dates, times, or combinations of the two.
1 2 3 |
<time datetime="14:00">2pm</time> <time datetime="2011-07-14">July 14th, 2011</time> <time datetime="2011-07-14T14:00">2pm on July 14th</time> |
The datetime attribute isn’t necessary, but if it’s not used it’s value needs to be shown to the visitor.
1 |
<time>2011-07-14</time> |
One obvious use for the time tag is with the hCalendar microformat.
1 |
<time class="dtstart" datetime="2011-07-14"> July 14th, 2011</time> |