HTML TIME <time> Tag
0 1916
HTML TIME <time> tag represents the date and time.
It represents either time on a 24-hour clock or a precise date in the Gregorian calendar with optional time and time zone information. TIME tag has been configured to present date and time in a machine-readable format.
It can be helpful for users when agents to offer event schedule for a user's calendar. HTML <time> is a new tag and introduced in HTML5.
Syntax to define Date and Time:
<time> Define Time and Date here </time>
The <time> tag is written as <time> Define Time and Date here </time> inserted between the start and end tags.
Note:
The time tag is not supported in Internet Explorer 8 and earlier versions.
Program:
<!DOCTYPE html> <html> <head> <title>HTML Time Tag</title> </head> <body> <h2>Example of Time Tag</h2> <p>The school open at <time>8:00</time> in the every morning.</p> <p>Mahatma Gandhi's birthday is on <time datetime="2020-10-02">2 October</time>.</p> </html>
Output:
Share:
Comments
Waiting for your comments