HTML datetime attribute


The purpose of the HTML datetime attribute is to specify the date and time of a change occurred in an HTML document.

Supported elements

HTML datetime attribute supports del and ins element.


<ElementName data="value" >.....</ElementName> 

Where ElementName is any supported element.

Type of value



A datetime value.

Default value

There is no default value of HTML datetime attribute.

Supported doctypes

HTML 4.01 strict, HTML 4.01 transitional, HTML 4.01 frameset.

Example of HTML datetime attribute with ins and del

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Example of HTML datetime attribute with ins and del</title>
<p>We are using <del   datetime="2011-01-05T08:15:30-05:00">HTML   4.01</del>    <ins   datetime="2011-01-05T08:15:30-05:00">XHTML   1.0</ins> for our pages.</p> 


html datetime attribute with ins and del

View this example in a separate browser window

Example of HTML datetime attribute with ins and del

Previous: HTML data attribute
Next: HTML declare attribute

Test your Programming skills with w3resource's quiz.

Follow us on Facebook and Twitter for latest update.

We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook