• Any consensus/resource how to markup date (time) ranges? Presuambly using the <time datetime> element? For example Nov 10 – Dec 1 or Nov 10, 9:00–10:30

Viewing 1 replies (of 1 total)
  • The HTML5 specification doesn’t provide a native way to represent date ranges within a single <time> element. You can use two <time> elements to represent the start and end dates of the range:

    Nov 10 – Dec 1:

    <time datetime="2023-11-10">Nov 10</time> – <time datetime="2023-12-01">Dec 1</time>

    Or for the times on the same date (e.g. Nov 10, 9:00–10:30) you can do:

    <time datetime="2023-11-10">Nov 10</time>, <time datetime="2023-11-10T09:00">9:00</time>–<time datetime="2023-11-10T10:30">10:30</time>
Viewing 1 replies (of 1 total)
  • The topic ‘date/time range markup’ is closed to new replies.