Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML ins datetime Attribute

HTML datetime property

HTML ins Tag Reference HTML tag

Example

A section of inserted text, with the date and time when the text was inserted:

This is some text.

This is an inserted text.

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

The datetime attribute has no visual effect in ordinary web browsers, but can be used by screen readers.


Definition and Usage

The datetime attribute specifies the date and time when the text was inserted or modified.


Differences between HTML 4.01 and HTML5

none.


Syntax

Attribute values

Value Description
YYYY-MM-DDThh:mm:ssTZD Specifies the date and time when the text was inserted or modified.

Explanation of the components:

  • YYYY - year (for example 2009)
  • MM - month (for example, 01 for January)
  • DD - day of the month (for example, 08)
  • T - required separator
  • hh - hour (for example, 22 for 10.00 PM)
  • mm - minute (for example, 55)
  • ss - second (e.g. 03)
  • TZD - time zone designator (Z stands for Zulu, which is also Greenwich Mean Time)
  • |

    HTML ins Tag Reference HTML tag