The TIME tag is newly introduced in HTML5 and is used to define the date and/or time on a Web page.
The TIME tag displays the time in 24-hour clock format and the date in the proleptic Gregorian calendar format.
The TIME tag provides the datetime attribute, which is used to specify the valid date and time.
The following table describes the attributes of the TIME tag :
|datetime||Specifies the date and/or time|
|pubdate||Specifies the publishing date and time of a document|
Following is an example of using the TIME tag :
<P>This example is written on <TIME datetime="2009-11-10">Friday</TIME>.</P>
In addition to the datetime attribute, the TIME tag also contains the pubdate attribute. This attribute is more useful when the TIME tag is defined inside the ARTICLE tag.
The pubdate attribute indicates that the date and time specified in the TIME tag is the publication date of the article defined in the nearest ancestor ARTICLE tag.