CSS <time> Data Type
The CSS <time>
data type denotes time dimensions expressed in seconds or milliseconds.
Here are some valid <time>
values:
Time values are dimensions denoted by <time>
. A dimension is a number
immediately followed by a unit identifier, which is an identifier.
The unit identifiers for <time>
are:
- s
- Seconds.
- ms
- Milliseconds. There are 1000 milliseconds in a second.
A <time>
Example
When you see <time>
(including the <
and >
) anywhere in the CSS specifications, this refers to the fact that the value can be a valid time.
For example, the transition-duration
property accepts the following value/s.
So you could write something like this:
Here's a working example:
CSS Specifications
- The
<time>
data type is defined in CSS Values and Units Module Level 3 (W3C Candidate Recommendation, 29 September 2016) - It is also defined in Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification (W3C Recommendation 07 June 2011)