HTML5 introduced several new elements to address many common use cases that developers have faced over the years. As an example you can think to the new audio and video elements that allow you to avoid the use of third-party software like Flash and Silverlight to play audios and videos. While media streams play an important role on the web, the W3C and the WHATWG have also tried to enhance the semantic of web pages. One of these new elements is the time element.

The time element represents a date and/or a time in the Gregorian calendar. It’s an inline element (like span and a) and must have a closing tag (like div and span). When used in its simplest form, the content of the element must be a valid date and/or time string:

<!-- 1st June 2015 -->
<time>2015-06-01</time>

There are many variations to describe a date and a time that you can use with time, so I’ll let you read this very complete article (of mine):

http://www.sitepoint.com/html5-time-element-guide/

Trick of the day: The time element
Tagged on: