HTML Tags

HTML <time> Tag

The <time> tag defines a specific time or date, or both.
It helps browsers, search engines, and assistive technologies understand the time-related data in a machine-readable format using the datetime attribute.

This element is especially useful for events, schedules, articles, or timestamps in blog posts.

Syntax

<time datetime="YYYY-MM-DDThh:mm:ssTZD">Visible Time or Date</time>

Attributes

AttributeDescription
datetimeSpecifies the date and/or time in a machine-readable format (e.g., 2025-11-01T10:00).
idDefines a unique identifier for the element.
classDefines one or more class names for CSS styling.
styleApplies inline CSS styles.

💡 Note: The datetime attribute helps search engines understand structured data, improving SEO.

Example

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Time Tag Example</title>
</head>
<body>
  <h1>HTML &lt;time&gt; Tag Example</h1>
  <p>The seminar will start at <time datetime="2025-11-05T14:00">2:00 PM, November 5, 2025</time>.</p>
</body>
</html>

Output

Browser Output

The visible text will be displayed as:
“2:00 PM, November 5, 2025”

However, browsers and search engines can read the datetime attribute as machine-readable information.
You can try this in our TryIt Editor to view the output and inspect the HTML for structured data.

Browser Support

Chrome
Chrome
Firefox
Firefox
Edge
Edge
Safari
Safari
Opera
Opera
IE
IE9+
✅Yes✅Yes✅Yes✅Yes✅Yes✅Yes

All browsers support this <time> tag, but IE has limited support for this.

Notes

  • The <time> tag does not change how text looks by default.
  • It allows search engines and other applications to extract and understand time-based information.
  • Always use ISO 8601 format for the datetime attribute (e.g., 2025-11-01T09:30).
  • The tag improves SEO and accessibility for date and time content.

Conclusion

The <time> tag is a semantic and SEO-friendly way to represent dates and times.
It makes your web content more meaningful for both users and search engines, especially for event-based or time-sensitive information.

Sign In Form

User your email and password to singn in

Don’t have an account, signup here : 

HTML5 & CSS3

Tools and Tutorials

Want a Website

Want a website for your business ?

Please fill out the details below, so we can reach out to you.

Registration Form

Signup to track your record and much more.

We have sent you an email with a registration link. Please click the link to verify your email address, or enter the 6-digit OTP provided in the email.

Didn't receive the OTP. Regenerate OTP Resend