Re: <br> as paragraph separator

> In IE7, and IE8 and IE9 Beta in quirks mode, <br>
> is treated as a paragraph separator. However, in
> IE8 and IE9 in standards mode, it is treated as a
> line separator and does not end the bidi paragraph.

Wow! I had not noticed this.

I guess standards really means standards, which is good. And they can always
fall back on quirks and "strict" mode, to keep existing documents from
breaking.

The question is whether this means that the change re <br> in HTML5 should
be rolled back.

My gut feeling is it should not. Regardless of what <br> is supposed to be,
authors usually assume it is the equivalent of a newline in plain text, and
bidi users (but not monodirectional users!) are very unpleasantly surprised
when it does not behave the same way. Using <p> and </p> is challenging in
many scenarios, and so the use of <br> where <p> really should have been
used is rampant. As a result, it is that much more difficult to work bidi
support into web apps, since they must be changed to stop using <br> as a
paragraph separator. This request is often treated as unreasonable and never
implemented.

Thus, IMO, we should leave HTML5 in its present state, i.e. with <br> as a
paragraph separator. Since standards seem to be being followed in standards
mode, I hope that IE9 will revert to the old behavior.

However, I would be very interested in hearing others' opnions, in both
directions.

> Even more surprisingly, in IE8 in standards mode,
> a line break in preformatted text is also treated as
> a line separator.

Bug.

> IE9 Beta has reverted to treating it as a paragraph
> separator.

Good.

> I also discovered strange behaviour in Safari 5.0.3:
> if a <br> or line break in preformatted text is followed
> by a rtl embedding, e.g.
> <div>ltr RTL,<br><span dir="rtl">MORE RTL</span></div>
> the comma at the end of the first line is rendered to the
> left of the rtl text, as if there were another rtl character
> following it.

Very strange. Also happens in Chrome. Looks like a WebKit bug.

Aharon

Received on Wednesday, 15 December 2010 21:31:40 UTC