Home Tutorials HTML Tutorial Time and Data Elements
Time and Data Elements

Time and Data Elements


43. Time and Data Elements

The <time> element marks dates or times semantically, and <data> links visible content to a machine-readable value. These help with richer semantics in HTML.

Syntax

<time datetime="2026-06-20">June 20, 2026</time>
<data value="101">Product A</data>

Example

<p>Meeting date: <time datetime="2026-06-20">June 20, 2026</time></p>
<p><data value="5001">Course ID</data></p>

Output

The date and Course ID text appear normally, but they also carry machine-readable values in the markup.
Example

🏋️ Test Yourself With Exercises

Take our quiz on Time and Data Elements to test your knowledge.

Browse Quizzes »