Valentine's Day.

``` --- ##"> Valentine's Day.

``` --- ##" />
Easy Tutorial
❮ Tag Dir Tag Area ❯

HTML <time> datetime Attribute

HTML <time> Tag

Example

Specifying a date with the time element:

<p>I have a date on <time datetime="2008-02-14">Valentine's Day</time>.</p>

Browser Support

The datetime attribute does not render any special effects in any browser.


Definition and Usage

The datetime attribute specifies the date or time. It is used when the date or time is not specified within the content of the element.


Differences Between HTML 4.01 and HTML5

The <time> tag is a new tag in HTML5.


Syntax

Attribute Values

Value Description
YYYY-MM-DDThh:mm:ssTZD Date or time. The components are explained below: YYYY - Year (e.g., 2011)<br> MM - Month (e.g., 01 for January)<br> DD - Day (e.g., 08)<br> T - Required separator if time is specified<br> hh - Hour (e.g., 22 for 10.00pm)<br> mm - Minute (e.g., 55)<br> ss - Second (e.g., 03)<br> TZD - Time zone identifier (Z stands for Zulu, also known as Greenwich Mean Time)

❮ Tag Dir Tag Area ❯