[whatwg] HTML 5: The l (line) element

Christoph Päper christoph.paeper at crissov.de
Tue Feb 19 02:22:32 PST 2008

Dave Hodder:
> Please consider adding the 'l' element (as found in XHTML 2).

I think this has been discussed (much) earlier. Anyhow.

We could also consider to reuse |br| for this purpose and thus make it magic,
i.e. it is empty by default and works like it has always done, but if "</br>"
is encountered it turns the preceding "<br...>" (but not "<br.../">) on the
same nesting level from an empty into a start tag. (If there is no start tag,
it is an authoring mistake.) In XHTML5 this would be easy.
One problem of this idea is the backwards compatibility for the first line,
because |br| traditionally generates a line break immediately, i.e. before not
after the logical line.

  <br>first line</br>
  <br>second line</br>
  <br>n-1th line</br>
  <br>nth line</br>

becomes in current implementations

  zeroth line<br>
  first line<br>
  second line<br>
  n-1th line<br>
  nth line

Another problem are multiple (adjacent) empty/start tags, where you probably
would have to disallow nesting of lines to describe current rendering of
multiple (consecutive) line breaks, which is not conformant with HTML4.

More information about the whatwg mailing list