tadam logo

HTML <del> datetime Attribute

Example

Use of the datetime attribute in the del element:
My favorite color is <del datetime="2009-01-08T22:55:03Z">blue</del> <ins>red</ins>!
The output of the code above will be:

Definition and Usage

The datetime attribute specifies the date and time when the text was deleted.

Browser Support

None of the browsers we tested do anything visual with the datetime attribute, but the information is available in the DOM for the purposes of scripting or styling with CSS.

Syntax

<del datetime="value">

Attribute Values

ValueDescription
YYYY-MM-DDThh:mm:ssTZDThe date and time the text was deleted.

Explanation of components:

  • YYYY - year (e.g. 2009)
  • MM - month (e.g. 01 for January)
  • DD - day of the month (e.g. 08)
  • T - a required separator
  • hh - hour (e.g. 22 for 10.00pm)
  • mm - minutes (e.g. 55)
  • ss - seconds (e.g. 03)
  • TZD - Time Zone Designator (Z denotes Zulu, also known as Greenwich Mean Time)
Was this information helpful?
   

Comments