W3C home > Mailing lists > Public > public-html@w3.org > July 2015

Allowing nested <time> elements.

From: Ian Devlin <ian.devlin@gmail.com>
Date: Fri, 3 Jul 2015 12:13:25 +0200
Message-ID: <CAOYOhSvESKpwch7tK6tB06YxeM63UTSE44cM174JedmKRAJTtw@mail.gmail.com>
To: "public-html@w3.org" <public-html@w3.org>
There is, apparently, a constraint on the <time> element that forbids them
from being nested. This constraint is not mentioned in the specification
itself but I did find it mentioned in an old, out of date, document (
http://www.w3.org/TR/html-markup/time.html#time-constraints). The W3C
validator also marks nested <time> elements as an error.

If nested <time> elements were allowed, it would then be possible to define
more semantic HTML calendars such as:

<time datetime="2015" class="year">
  <time datetime="2015-07" class="month">
    <time datetime="2015-W27" class="week">
      <time datetime="2015-07-01">1</time>
      <time datetime="2015-07-02">2</time>
      <time datetime="2015-07-03">3</time>
      <time datetime="2015-07-04">4</time>
      <time datetime="2015-07-05">5</time>
    <time datetime="2015-W31" class="week">
      <time datetime="2015-07-27">27</time>
      <time datetime="2015-07-28">28</time>
      <time datetime="2015-07-29">29</time>
      <time datetime="2015-07-30">30</time>
      <time datetime="2015-07-31">31</time>

The WHATWG Wiki also recommends allowing nested time elements (
listing other benefits.

Does anyone know why this constraint was added?
Is it still necessary?

Or is what I am saying irrelevant, that this contraint has been removed
from the spec. and the validator has not yet been updated?

Any thoughts on this are appreciated.
Received on Friday, 3 July 2015 12:30:08 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:46:14 UTC