I have said it multiple times here, in W3C mailing-lists or in public between 1998 and now but apparently it must be said again and again: the current HTML5 Last Call Working Draft - that does not reach at all the quality of other LCWD in the W3C and did not meet the basic requirements for a LCWD in the W3C Process - still has not worked on that erratum. So let me repeat it : html5 ins and del elements suck and should be dropped in favor of a better solution.

  • ins and del are, by definition, both inline-level and block-level elements. If in a Wysiwyg editor, you select the textual contents of a paragraph, turn on a "Visible Modification Marks" feature and hit the Delete or Backspace key, the editor has the option between <del><p>....</p></del> and <p><del>...</del></p>. The user has no way to make a difference between the two but the two are NOT strictly equivalent. In the latter case, it is still theoritically possible to place the caret in the paragraph but BEFORE or AFTER the del element and insert new chars. In the former case, the whole paragraph is deleted and the user can't insert anything inside any more.
  • In the latter case just above, it's impossible for the user to know if a caret placed at the beginning of the paragraph is before the paragraph, inside the paragraph but before the del element, or at the beginning of the del element.
  • much more importantly, ins and del cannot cover one trivial case : since there is no equivalent to SGML inclusions (see for instance this link for a rather clean explanation) in XML, the following is impossible: <ul><del><li>a</li></del><li>b</li></ul>. It is for instance totally impossible to mark an element as entirely deleted if the parent container's model does not allow the del element...

The situation is unfortunately very clear: the ins and del elements as they exist now in the various html specs are unable to provide editing environments with a workable and predictable solution for Visible Modification Marks, the primary reason why the elements were originally introduced in HTML 4. As a matter of fact, almost no Wysiwyg editor implements them.

For the n-th time in 13 years, I strongly recommend to drop the ins and del elements in favor of the following attributes. All elements inside the body element should be able to carry them.

  • change attribute ; possible values: inserted, deleted optionnally followed by a whitespace and one of the keywords reviewed or to-be-reviewed.
  • review-by attribute ; an arbitrary value meaningful only when the change attribute contains the to-be-reviewed value and meant to be displayed for human consumption ; can be for instance a name, a mail, a twitter id, etc.
  • reviewed-by attribute ; an arbitrary value meaningful only when the change attribute contains the reviewed value and meant to be displayed for human consumption ; can be for instance a name, a mail, a twitter id, etc.
  • the cite and datetime attributes as currently defined in the html5 spec

This is the minimum attributes set needed to resolve the issue. Another attribute "tagging" the potential reviews of the proposed change could also be added.

I really hope this change is going to happen. Again, the current ins and del html elements are totally hopeless.