HTML <time> Tag

Nov. 25, 2024

HTML <time> tag1:

The <time> tag defines a specific time (or datetime).

The datetime attribute of this element is used translate the time into a machine-readable format so that browsers can offer to add date reminders through the user’s calendar, and search engines can produce smarter search results.

Those available datetime formats can be found in documentations23.

It should be noted that “the <time> element does not render as anything special in any of the major browsers”4, for example:

1
Today is <time datetime="2024-11-25">Nov. 25, 2024</time>.

Today is .

We can see there is nothing special, but we can check its difference in developer mode. So I think the <time> tag is mainly convenient for web development, e.g. when using CSS and JavaScript, not for formating date strings.


References