Learn html - html tutorial - datetime Attribute in HTML - html examples - html programs
The datetime attribute specifies the date and time when the text was deleted or inserted.
The datetime attribute when used together with the <time> tag, it represents a date and or time of the <time> tag.
The datetime attribute has no visual effect in ordinary web browsers, but can be used by screen readers.
Syntax for datetime attribute in HTML:
<element datetime= “YYYY-MM-DDThh:mm:ssTZD”</element>
Differences between HTML 4.01 and HTML5 for datetime attribute:
HTML 4.01
HTML4 does not support <time> element
HTML 5
HTML5 support <time> element.
Applies To:
Attribute Values:
Value
Description
YYYY-MM-DDThh:mm:ssTZD
It is specifying the date or time.
YYYY is denotes year.
DD is denoting the date.
T is denotes a space.
hh denotes an hour.
mm denotes a minute.
ss denotes a second.
TZD denotes Time Zone Designator.
Sample Coding for datetime Attribute in HTML:
Tryit<!DOCTYPE html>
<html >
<body>
<head>
<title> Wikitechy datetime attribute</title>
</head>
<p>
<del datetime=”2014-7-22T17:55:02Z”> Content has been deleted
</del>
</p>
<p> <ins datetime=”2014-7-22T17:55:02Z”>
Content is here.</ins></p>
<p> I have a date on <time datetime=”2017-05-14 00:01”>
Mothers day.</time> </p>
</body>
</html>
Code Explanation for datetime Attribute in HTML:
datetime is used to define the date and time along with the content.
Output for datetime Attribute in HTML:
<del> element is used along with the datetime attribute. As content is shown in output.
<ins> element is used along with the datetime attribute. As content is shown in output.
<time> element is used along with the datetime attribute. As content is shown in output. But datetime attribute has no visual effect in ordinary web browsers, but can be used by screen readers.
Browser Support for datetime Attribute in HTML:
Related Searches to datetime Attribute in html
html datetime input
html time input
html datetime format
html date tag format
html current time
html time tag
html datetime now
html datetime picker
html tutorials html editor html code html form html tutorial html color html color codes html table html img html5 html code for website html and css html programs html website free html editor html5 tutorial wysiwyg html editor html tutorial pdf html converter php tutorial html example html tutorial css tutorial html css html tags html basics code html html online html mailto html lang html tags list
html attributes