QA
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→

More HTML & Semantic Web Interview Questions

Beginner LevelHTML & Semantic Web

What is Semantic HTML and why is it essential for modern web applications?

Beginner LevelHTML & Semantic Web

What is <!DOCTYPE html> and what happens if it is omitted?

Beginner LevelHTML & Semantic Web

What is the difference between inline and block-level HTML elements?