HTML & CSS Wiki
Advertisement


The HTML element was introduced in HTML5. It defines a time and/or a date.


Attribute[]

Attribute Value Description
datetime date & time Defines the date or time of the element. If this attribute is not specified, the element's date or time must be defined inside the element. The date is specified using the form of yyyy-mm-dd.
pubdate Boolean If specified, it indicates that the date and time given by the element is the publication date and time of the nearest ancestor <article> element, or, if the element has no ancestor <article> element, of the document as a whole. If the element has a pubdate attribute specified, then the element needs a date. For each <article> element, there must be no more than one element with a pubdate attribute whose nearest ancestor is the <article> element. Furthermore, for each Document, there must be no more than one element with a pubdate attribute that does not have an ancestor <article> element.
Global Attributes

See Global HTML Attributes and Standard HTML5 Attributes.


HTML example:

We open at <time>10:00</time> every morning.
HTML & CSS Wiki was created on <time datetime="2010-06-11">the 11th of June</time>.

External Links[]

Advertisement