What's the correct datetime format for a century in the HTML time element?

57 Views Asked by At

I wanted to use it to represent a century as a period of time, what would be a correct format for the datetime attribute using the HTML <time> element?

Example:

In the <time datetime="???">20th century</time> things changed a lot.

Correct me, please, if this is not a correct usage of the element.

1

There are 1 best solutions below

3
Sean On BEST ANSWER

This isn't what the time element is for. datetime must specify a specific point in time, or a specific duration of time. There's not a way to specify "100 years starting on this date".