3

This is how I would mark year 1971 up:

<time>1971</time>

<time datetime="1971">nineteen seventy-one</time>

But how do I mark a decade '70s up (there are also other ways of writing this, like seventies, 1970s, 70s, 1961-1970)?

Also, how do I mark 20th century up (1901-2000) using HTML5 tag?

4

The <time> tag is not meant to be used for time periods such as decades or centuries. You should not use it to mark up '70s or 20th century.

The documentation for the tag is here. It says that it can represent:

  • a date
  • a time
  • a date and time

The machine readable representation of those dates and/or times is based on rfc3339 which states in the introduction:

Date and time expressions indicate an instant in time. Description of time periods, or intervals, is not covered here.

You could use two tags to cover the start and end of the period. For Example you could mark up 1961-1970 as <time datetime="1961">1961</time>-<time datetime="1970">1970</time>. However when you use a phrase that covers the time period without mentioning its start and end times, it would not be appropriate to use one or more time tags.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.