HTML5 <time> Tag
ExampleHow to define a time and a date:
Try it yourself » |
Definition and Usage
The <time> tag defines a time or a date, or both.
Differences Between HTML 4.01 and HTML5
The <time> tag is new in HTML5.
Attributes
New : New in HTML5.
Attribute | Value | Description |
---|---|---|
datetimeNew | datetime | Defines the date or time of the element. If this attribute is not defined, the element's date or time must be defined inside the element |
pubdateNew | pubdate | Specifies that date and time in the time element is the publication date and time of of the document, or the nearest ancestor article element |
Standard Attributes
The <time> tag also supports the Standard Attributes in HTML5.
Event Attributes
The <time> tag also supports the Event Attributes in HTML5.