

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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>
- Related Questions & Answers
- How to change date time format in HTML5?
- Add DATE and TIME fields to get DATETIME field in MySQL?
- Java program to add a given time to a particular date
- How to format date and time in android?
- AngularJS and HTML5 date input value - how to get Firefox to show a readable date value in a date input?
- How to print current date and time in a JSP page?
- How to get current date and time in Python?
- How to get formatted date and time in Python?
- How to get current date and time in JavaScript?
- How to get current time and date in C++?
- How to order by date and time in MySQL?
- How to display date and time picker in ReactNative?
- How can we add a time interval to date stored in a column of MySQL table?
- How to set default date time as system date time in MySQL?
- How to add hours and minutes to a date with JavaScript?
Advertisements