Categories
Web development

HTML time tag

Learn the HTML time tag.



HTML time tag

The HTML <time> element specifies a specific time (or datetime).

The HTML datetime attribute of this tag is used to translate the time into a machine-readable format so that browsers can offer to add date reminders through the user’s calendar.

Example:

<!DOCTYPE html>
<html>
<body>

<p>We have a job meeting from <time>11:00</time> to <time>12:00</time> every Friday.</p>

<p>I have a meeting on <time datetime="2021-12-03 18:00">Friday</time>.</p>

</body>
</html>

Output:

We have a job meeting from to every Friday.

I have a meeting on .


Enjoy coding!

Read also:

HTML caption tag

HTML audio tag

HTML iframe tag