- Trending Categories
- 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
How to add a date and time in HTML5?
Use the <time> tag to add date and time. The HTML <time> tag is used for displaying the human readable date and time.
The HTML <time> tag also supports the following additional attribute −
Attribute | Value | Description |
---|---|---|
datetime | datetime | It is a machine readable date time |
Example
You can try to run the following code to learn how to add date and time <details> in HTML5 −
<!Doctype html> <html> <head> <title>HTML time Tag</title> </head> <body> <p>The time is <time>08:30 pm</time></p> </body> </html>
Advertisements