[whatwg] INS and DEL in lists

Tab Atkins Jr. jackalmage at gmail.com
Fri Mar 28 07:12:13 PDT 2008

On Fri, Mar 28, 2008 at 6:02 AM, Keryx Web <webmaster at keryx.se> wrote:

> Henri Sivonen skrev:
> > For various legacy parsing reasons and in the table case for CSS table
> > model reasons, this kind of thing is seriously more trouble for
> > implementors than it is worth. From an implementation cost/benefit point
> > of view, I am against allowing ins/del in more places.
> >
> But from what I've understood it actually works as expected today (in
> lists). Not that I've yet tested this exhaustively.
> Allowing list markup in tables seems to be a nightmare to spec and
> implement - and teach! Ins and del in tables is no priority of mine
> either.
> Lars Gunther
Yes, if you have any insight as to why it is difficult, please share.  As it
is, browsers (specifically, FF2, IE7, and Opera9) seem to handle it just
Note - this is obviously triggering quirks mode.  FF2, in fact, refuses to
style the <ins> and <del> elements if you give the page a proper DOCTYPE.
The other two browsers seem to accept it just fine, though.

In DOM terms, both FF and Opera create a well-formed, identical tree.  IE
does something... weird.  I don't really understand what's going on there in
the DOM, mainly because I've never seen a red tagname before.  However, it
obviously styles things correctly.  Note, though, that IE drops the tags
when it displays the InnerHTML.  Odd.

>I like the idea of a list header, maybe <lh>
No need to add a new element.  Some simple experimentation shows that all
major browsers will accept a simple <h1>.  That still communicates the
semantics you want, without any backwards-compatibility issues.

>> I doubt this is something we'd ever want in HTML.  CSS3 can do this
>> just fine with generated content and counters, though.
>And the original problem can be solved using CSS2;
>I only wanted to bring a similar example:
>HTML poorly supports interleaving unrelated markup streams.
Please, elaborate.  The reason this is a problem is because it *can't* be
well-solved with CSS.  If the <ins>/<del> is used *within* an <li> then it
breaks the numbering of <ol> when you hide the <del>'d elements.  The
semantics are wrong as well - it indicates that you have a list item with
deleted text, not a deleted list item.  The ability to wrap <ins>/<del>
around <li> solves a specific semantic issue and a display issue as well.

On the other hand, mixing together lists and tables doesn't seem to have any
good semantic interpretation.  The reason I objected to that example was
because you'd pretty much just be jacking the *display* of <ol> for your own
purposes, without regard to the semantics.  If you just want something
numbered without giving it proper list semantics, hand-number it or use
generated content.

Now, an objection I can think of is that, if <ins>/<del> around <li> is
allowed, there's no good reason not to allow it around <tr> or <td> either,
or even <tbody> for that matter.  It would have clear, useful semantics, but
would likely be a lot more complex.  The following link shows that every
browser parses it differently, and none of them actually pay attention to

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080328/831ce1d7/attachment-0001.htm>

More information about the whatwg mailing list