- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML datetime Attribute
The datetime attribute of the <ins> element is used to specify the date and time displaying when the text was inserted.
Following is the syntax −
<ins datetime="YYYY-MM-DDThh:mm:ssTZD">
Above, the attribute datatime displays the datetime when the text was inserted in the following format −
- YYYY - year
- MM - month
- DD - day of the month
- hh - hour
- mm - minutes
- ss - seconds
- TZD - Time Zone Designator
Let us now see an example to implement the datetime attribute of the <ins> element −
Example
<!DOCTYPE html> <html> <body> <h1>Demo Heading</h1> <ins cite = "new.htm" datetime = "2019-05-11T18:30:03Z">Text is inserted.</ins> </body> </html>
Output
In the above example, we have inserted a text using the <ins> element −
<ins cite = "new.htm" datetime = "2019-05-11T18:30:03Z"> Text is inserted. </ins>
Above, we have set the reason of insertion using the cite attribute −
cite="new.htm
With that, we have set the date of insertion using the datetime attribute −
datetime = "2019-05-11T18:30:03Z
Advertisements
To Continue Learning Please Login
Login with Google