HTML basics: Dates and machine-readable time
time can display a friendly label while datetime supplies an unambiguous machine-readable date.
Current edit
Understand the pattern
time can display a friendly label while datetime supplies an unambiguous machine-readable date.
time can display a friendly label while datetime supplies an unambiguous machine-readable date.
Misconceptions to reject
- A visual appearance alone guarantees the intended HTML meaning.
- Replacing semantic elements with generic divs automatically improves accessibility.
The preview is a sanitized subset, not a full browser compatibility test.
Worked example and expected result
<p>Next workshop: <time datetime="2026-09-12">September 12, 2026</time></p>
<p>Doors open at <time datetime="09:30">9:30 AM</time>.</p>time can display a friendly label while datetime supplies an unambiguous machine-readable date.
Explain it
Apply it elsewhere
Keep the momentum.
Complete the lab, then explain and apply the pattern.
Next: HTML basics: Data attributesTry an incident drillAnonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.
Keep learning
- 01HTML basics: Quoted contentblockquote identifies an extended quotation; cite names a work, not merely a person.Practice
- 02HTML basics: Data attributesdata-* attributes store page-specific information without pretending that it is visible text or a standard HTML behavior.Practice
- 03HTML basics: Reusable class namesClasses let multiple elements share presentation. IDs should identify a single element within a document.Practice