← Back to all elements

The <time> Element

The <time> element is used to mark up dates, times, or durations in a machine-readable way, while displaying a human-friendly format to users. The datetime attribute uses the ISO 8601 format, making it useful for search engines, browsers, and assistive technologies.

When to use it

Use the <time> element to semantically mark up dates, times, or durations in your content.

It is especially valuable for blogs, news sites, and social media platforms where accurate date and time information is important.

The datetime attribute allows machines to extract and process the date/time, while users see a friendly format.

Live Demo & Code