Beginner LevelHTML & Semantic Web
How does the <time> element provide machine-readable timestamps?
❓ Interview Prompt: Explain <time> element, datetime attribute, ISO 8601 formatting, and calendar search engine benefits.
The '<time>' element represents a specific period in time or calendar date. The 'datetime' attribute provides an ISO 8601 formatted machine-readable string ('YYYY-MM-DDTHH:MM:SSZ') while human-readable text is displayed inside the tag.
Benefits:
Search engines and calendar apps parse 'datetime' attributes to automatically offer event reminders and rich search snippets.
Code Implementation Example
html
<p>
The conference takes place on
<time datetime="2026-10-15T09:00">October 15, 2026 at 9:00 AM</time>.
</p>💡Formatting machine-readable timestamps using time and datetime attribute.
🎯 Interview Key Takeaway
Wrap human-readable dates in <time datetime="ISO-8601"> for machine-readable calendar indexing.
#time tag#datetime#ISO 8601#Beginner
Back to all HTML & Semantic Web Questions→