Latest web development tutorials

HTML del datetime attribute

HTML del Tag Reference HTML <del> tag

Examples

A paragraph of text with the time and date have been removed:

<p><del datetime="2011-11-15T22:55:03Z">这是一个被删除了的文本</del></p>

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

No major browsers support datetime attribute, but it can be read by a screen reader.


Definition and Usage

datetime attribute specifies the date and time the text is deleted.


Differences between HTML 4.01 and HTML5

NONE.


grammar

<del datetime="YYYY-MM-DDThh:mm:ssTZD">

Property Value

value description
YYYY-MM-DDThh: mm:ssTZD

Text deleted date and time.

Components explained:

  • YYYY - Year (for example, 2009)
  • MM - month (for example 01 for January)
  • DD - day of the month (for example 08)
  • T - Required separator
  • hh - hours (for example, 22 for 10.00pm)
  • mm - min (e.g. 55)
  • ss - seconds (such as 03)
  • TZD - time zone designator (Z represents Zulu, but also GMT)


HTML del Tag Reference HTML <del> tag