HTML: The Markup Language

timedate and/or time NEW # T

The time element represents a date and/or time.

Permitted content #

Permitted attributes #

Descriptions for attributes specific to this element #

datetime = date or time
Specifies the date or time that the element represents.
pubdate = "pubdate" or "" (empty string) or empty
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.

Additional constraints and admonitions #

Tag omission #

A time element must have both a start tag and an end tag.

Permitted parent elements #

any element that can contain phrasing elements

Details #

If the datetime attribute is not specified, then the date or time represented is given by the contents of the element, and the character data in those contents must conform to the date-or-time datatype.

DOM interface #

interface HTMLTimeElement : HTMLElement {
           attribute DOMString dateTime;
           attribute boolean pubDate;
  readonly attribute  valueAsDate;